Just a thought on sed

Phil Gendreau phil at xmailer.ods.org
Sat May 4 10:55:25 PDT 2002

* Rob 'Feztaa' Park <feztaa at shaw.ca> [2002-05-02 21:36]:
>     mv file file~ &&
>     sed 's/foo/bar/g' file~ > file &&
>     rm file~
> With this:
>     perl -i -pe 's/foo/bar/g' file

Sorry if I picked up late on that thread, 
but I'm not subscribed to lfs-dev.

Another way to do it, which was suggested on another 
mailing list and I think could be used in the book,
is to echo the command, thus protecting the file 
from the shell, like this:

$ echo "$(sed 's/foo/bar/g' file)" >file

Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message

More information about the lfs-dev mailing list