Hi, Am Sonntag, 21. Dez 2008, 02:08:04 -0800 schrieb Gary Kline: > On Sun, 2008-12-21 at 07:42 +0200, Giorgos Keramidas wrote: > > On Sat, 20 Dec 2008 21:34:10 -0800, Gary Kline <kl...@thought.org> wrote: > > > > > > sed '8,10d'< file> newfile > > > or is there a better way? > > > > keram...@kobe:/tmp$ sed -i '' -e '2d' foo > > > thanks much. it works just fine in-place. ...but i did made a separate > copy, just in case;-)
To make a copy, call $ sed -i .bak 8,10d myfile Be aware that the -i option is not portable. -> man sed /^STANDARDS Consider Perl or $ ruby -i.bak -pe 'next if 8..10 === $.' x Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"