On 2003-12-04 10:15:13 +0000 Michael Forster <[EMAIL PROTECTED]> wrote:

Hi,

[EMAIL PROTECTED] wrote:
is there a tool to change all occurences of a servers ip-address?

in bash:


for file in /etc/*; do
  perl -pi -e "s/12.34.56.78/23.34.45.56/ $file;"
done
^^^ wouldn't be *QUITE* right ;)

the $file should be in a seperate set of "", so perl -pi -e "s/12.34.56.78/23.34.45.56/sg;" "$file"

and the reason to put $file in ", as we all know, is for those odly named files that some how manage to get on the system with odd characters in 'em ;)

Cheers,

Brett.


-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Reply via email to