sed replacement

William D Ricker wdr at TheWorld.com
Mon May 16 21:55:44 EDT 2005


> cat myfile | sed -e "s/text/\n\ntext/"

perl -i.bak -ple 's/text/\n\ntext/' myfile
will put old myfile in myfile.bak and myfile fixed in myfile.
omit -i.bak if you really really want it on stdout


-- 
/"\     Bill Ricker  N1VUX  wdr at world.std.com = wdr at TheWorld.com
\ /     http://world.std.com/~wdr/           
 X      Member of the ASCII Ribbon Campaign Against HTML Mail
/ \



More information about the Discuss mailing list