[clue] Piping, xargs, find, grep and such
    David L. Anselmi 
    anselmi at anselmi.us
       
    Sun Sep 16 21:07:30 MDT 2012
    
    
  
jacob wrote:
>
> puts "#{ARGF.filename}:#{output}" if output =~ /pattern/
Yeah, when you're dealing with something modern like Perl or Ruby it may not make sense to do work 
in external programs.  They handle command line args easily and do pattern matching as well and as 
simply as grep.
So you have to decide whether Jacob's suggestion is more elegant than the ones I suggested, which 
will depend on whether it's more useful to adapt your output to work with grep or to add flexibility 
to work either way.
Dave
    
    
More information about the clue
mailing list