From: ara.t.howard@... Date: 2005-12-28T02:38:57+09:00 Subject: Re: Found a neat trick for doing recursive one-liners On Wed, 28 Dec 2005 dblack@wobblini.net wrote: > Hi -- > > On Wed, 28 Dec 2005, ara.t.howard@noaa.gov wrote: > >> On Tue, 27 Dec 2005, Philip Rhoades wrote: >> >>>> ruby -e' puts Dir["**/**"].select{|e| e =~ /a.rb/} ' >>> >>> >>> That doesn't seem to do anything . . >> >> then you probably don't have any files named 'a.rb' under the current >> directory - i seem to have several hundred ;-) > > Or abrb, or acrb, or airbag, or.... :-) indeed. or diectories. that's the nice thing about using select: ruby -e' puts Dir["**/**"].select{|e| test ?f, e and e =~ /^a\.rb$/} ' -a -- =============================================================================== | ara [dot] t [dot] howard [at] noaa [dot] gov | all happiness comes from the desire for others to be happy. all misery | comes from the desire for oneself to be happy. | -- bodhicaryavatara ===============================================================================