sed -i s/aaa/bbb/ file
=
perl -pi -e s/aaa/bbb file
backup as .bak
sed -i.bak s/aaa/bbb/ file
PS.
-i [suffix] is wrong under Linux (space not allowed between -i and [suffix])
sed in Solaris not support this parameter
沒想到您也用 -i switch 可以這樣用。學到囉!
Posted by: Baiz at December 6, 2004 03:56 PM