[plug] Extreme text editing

Bernard Blackham bernard at blackham.com.au
Tue Oct 7 22:43:03 WST 2003


On Wed, Oct 08, 2003 at 12:32:37AM +1000, Kimberly Shelt wrote:
> Isn't sed supposed to shine in this department ?#
> Line by line and all that ??

Good point. :) It'd still suffer the same perils as the (head
;echo;tail) solution - it still rewrites the entire file (using the
-i option). But the sed one-liner would be:

sed -i -e '1234567cThis is the new world.' bigfile
*make some coffee*

> Kim
> (who rarely uses sed more than to s/borken_bit/less_borken_bit/ :)

People write entire games of snake in sed ... scary stuff :)

Bernard.

-- 
 Bernard Blackham 
 bernard at blackham dot com dot au
_______________________________________________
plug mailing list
plug at plug.linux.org.au
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug


More information about the plug mailing list