On Thu, Apr 19, 2001 at 01:49:12PM +1000, Peter Hardy wrote:
> On Thu, Apr 19, 2001 at 11:24:36AM +1000, Tony Green wrote:
> > * 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:
> *bash hack snipped*
> > 
> > perl -i -pe 's/gzip/bzip2/g' *
> Halfway there, but I need to recurse subdirs, which this command doesn't
> do..  The challenge is still open, and I'll put up a free beverage to the
> best reply; bonus points for niftiness, obfuscation, or obscure languages.
> Two beers if anybody does it in nqc before me..

ahh easy :)

find . -type f -exec perl -i -pe 's/gzip/bzip2/g' {} \;


-- 
John Ferlito
Senior Engineer - Bulletproof Networks
ph: +61 (0) 410 519 382
http://www.bulletproof.net.au/

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

Reply via email to