[plug] Find similarly named files in directories
    Timothy White 
    weirdit at gmail.com
       
    Sat Jan 13 13:39:28 WST 2007
    
    
  
On 1/13/07, Lyndon Maydwell <maydwell at gmail.com> wrote:
> hmm, that will teach me for not testing propperly
> find|ruby -e 'h={};STDIN.each{|l|l[/.*\/(.*)/];(h[$1]||=[])<<l};
> h.each{|k,v| puts v if v.length > 1}'
> suddenly bigger
Better. You get the same result as Bernards. (Mine would probably as
well, if I generated a new set of test data without that strange char
in it.)
And the timing isn't bad!
real 1.715      user 1.524      sys 0.120       pcpu 95.87
I count 96 characters or so.
Nice job Lyndon!
Tim
-- 
Linux Counter user #273956
Don't email joeblogs at scouts.org.au
    
    
More information about the plug
mailing list