On Tue, 8 Mar 2005, Bill Kelly wrote:

> find foo -name "*.o" | xargs rm
>
> grep sshd /var/log/auth.log | grep password

Hmm, thats another good Idiom. I often merge that in with backtick or
   open("|find foo -name '*.o'|filter1|filter2")

There is another Red Hat feeling for you. The Find module is ideal for 
Oneliners, but somehow Find.find( path, path, ...) is too verbose. It 
needs a globbing interface like Dir. eg.

class Find
   def Find.[](string)
     Find.find(*Dir[string]) do |path|
       yield path
     end
   end
end

Tie that to a command line option would be sweet
   eg. ruby --find='/etc/*.d' --type=f -e 'Do stuff per file coming by'




John Carter                             Phone : (64)(3) 358 6639
Tait Electronics                        Fax   : (64)(3) 359 4632
PO Box 1645 Christchurch                Email : john.carter / tait.co.nz
New Zealand

Refactorers do it a little better every time.