[Gllug] Awk Sed
Gordon Joly
gordon.joly at pobox.com
Fri Dec 7 10:38:53 UTC 2001
At 20:18 +0000 2001-12-06, Stig Brautaset wrote:
>
>$ sed -e 's/1/2/g' file > c && mv c file
>
>will change all occurences of "1" to "2" in file. I don't think sed can
>do in-file replacements though, but I am sure someone can prove me wrong
>(I would be quite glad if someone could, because I have missed that
>feature).
>
>Regards,
>Stig
It is all on the name.
sed = streaming ed (streaming editor)
So, no, it will only edit streams (e.g. from files, sockets(?), or stdio etc).
Gordo
--
Gordon Joly//////////
gordon.joly at pobox.com
http://pobox.com/~or/
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list