[plug] grep task?

Bernard Blackham bernard at blackham.com.au
Sat Nov 22 15:08:47 WST 2003


On Sat, Nov 22, 2003 at 02:21:46PM +0800, Cameron Patrick wrote:
> 	sed 's/anarchist at blah/entombednerds at blah/g' <${file} >${file}.new || exit 1

You can replace this line with:

  sed -i.bak -e 's/anarchist at blah/entombednerds at blah/g'

-i is for in-place. And use .bak as the old, and the new filename as
the new.

Or as Onno pointed out, just grep for it in the first place, then
you don't need to have the backup files lying around to find out.

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