[plug] grep task?

Onno Benschop onno at itmaze.com.au
Sat Nov 22 14:27:23 WST 2003


On Sat, 2003-11-22 at 17:02, John Knight wrote:
> 1. search through the files for "anarchist_tomato at hotmail.com"

This returns a list of files that match your string:

	grep -ril "anarchist_tomato at hotmail.com" *


> 2. if found, replace with "entombednerds at yahoo.co.uk"

There is a whole thread in the archive using sed and awk, even dd to do
this.


> 3. report the name of the file that's just been changed.

You already have the list from the first command.


> Is that possible?

Yes :-)


<aside - feel free to ignore>
I was going to sign off with: "And for a fee I'd even write it for
you.", but then I thought someone might get upset about that.

Perhaps another way to put it would be to say that from your message I
see no evidence that you tried anything yourself, so I see no reason to
do anymore than point you in the right direction.

That too sounds a tad harsh, but I suppose I'm from the school where you
at least try yourself first, attempt to help the helper in the process
and gratefully acknowledge their support when it's done.

I realise that you could also put on a free-software hat, but I'm in the
business of writing software, so free as in beer doesn't pay for my
car-repayments or my satellite dish.
</aside>


Onno Benschop 

Connected via Optus B3 at S34°43'17" - E150°34'56" (Kangaroo Valley, NSW)
-- 
()/)/)()        ..ASCII for Onno.. 
|>>?            ..EBCDIC for Onno.. 
--- -. -. ---   ..Morse for Onno.. 

Proudly supported by Skipper Trucks, Highway1, Concept AV, Sony Central, Dalcon
ITmaze - ABN: 56 178 057 063 - ph: 04 1219 8888 - onno at itmaze 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