gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] new version hook script examples


From: John Meinel
Subject: Re: [Gnu-arch-users] new version hook script examples
Date: Sun, 14 Nov 2004 11:58:17 -0600
User-agent: Mozilla Thunderbird 0.7.1 (X11/20040626)

Zenaan Harkness wrote:


BTW, does anyone know/ use an alternative to perl -i for in-place
munging? I guess I should learn how to chain multiple lines such as the
following into one, since firing up perl for each line seems rather
heavy weight.

perl -pi -e "s#SUB_WEB_HOST#$SUB_WEB_HOST#g;" $SED_FILES
perl -pi -e "s#SUB_server.host#$SUB_server_host#g;" $SED_FILES
...

??

tia
zen


Actually, perl doesn't actually do in-place munging. If you notice, it creates .bak files, so really perl is doing:

mv $FILE $FILE.bak
perl $FILE.bak > $FILE
(maybe doing rm $FILE.bak)

I don't really see why you couldn't do this in your own scripts.

John
=:->

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]