I need a script for my following query... Please help
I have files like
customername_photonumber_version
customername-photonumber-version
reliance_123456_002
reliance_123456_001
reliance-123456-001
reliance_123456_001.01
reliance_111111_002
reliance_111111_001
reliance-111111-001
reliance_111111_001.01
reliance_555555_002
reliance_555555_001
reliance-555555-001
reliance_555555_001.01
maruthi_555555_002
maruthi_555555_001
maruthi-555555-001
maruthi_555555_001.01
maruthi_232323_002
maruthi_232323_001
maruthi-232323-001
maruthi_232323_001.01
I want a script that creates a folder 555555 and copy all the contents irrespective of _001 or -001 _002 reliance etc to the same folder
that is
555555->
maruthi_555555_002
maruthi_555555_001
maruthi-555555-001
maruthi_555555_001.01
reliance_555555_002
reliance_555555_001
reliance-555555-001
reliance_555555_001.01
and so on for all photo numbers. kindly help.
Thanks in advance!!!!
iMac, Mac OS X (10.6.8)