Thought the greater SLUG list would be slightly interested as well.
Apologies to people being annoyed by me again :-)

----- Forwarded message from Peter Hardy <[EMAIL PROTECTED]> -----

From: Peter Hardy <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [slug-chat] Another script challenge
Date: Thu, 19 Apr 2001 12:39:05 +1000

I want to replace every instance of 'gzip' occuring in a source tree with
bzip2.  This is how I did it:

for file in `grep -rl gzip *`
do cp $file $file.old
sed s/gzip/bzip2/ < $file.old > $file
done

But I'm sure there's a shorter solution.  Suggestions?

----- End forwarded message -----
Peter
[EMAIL PROTECTED]
--

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to