* This one time, at band camp, Peter Hardy said:
> 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?
perl -i -pe 's/gzip/bzip2/g' *
Should work
--
Greeno <[EMAIL PROTECTED]>
You mentioned your name as if I should recognize it, but beyond the
obvious facts that you are a bachelor, a solicitor, a freemason, and
an asthmatic, I know nothing whatever about you.
-- Sherlock Holmes, "The Norwood Builder"
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug