[plug] Find similarly named files in directories

Bernard Blackham bernard at blackham.com.au
Sat Jan 13 13:08:22 WST 2007


Lyndon Maydwell wrote:
> find|ruby -e 'h={};STDIN.each{|l|l[/.*\/(.*)/];h[$1]||=[]<<l};p h'
> 66 chars

It could be 65 if you omitted the space between e and ', but ...

> messy output, but technically works (or not?) :P

I can't get this to work. It lists every file for me. Care to submit a 
patch? :)

Ruby's one of those things I've been meaning to teach myself for a 
while, but never have. *sigh*

Cheers,
Bernard.



More information about the plug mailing list