Hi
Just check whether the following script will work.
Code:
IFSOLD=$IFS
IFS=\n
for i in $(cat input.file|sed 's/_[a-z]*//' |sort |uniq -c |grep -v '2 '| cut -b 9-); do grep $i input.file ;done
IFS=$IFSOLD
Replace 9- with the number of characters you want remove to get the file name without any white spaces or number.
Somebody pls point out a neater way of doing the above step without all pipings. There should be a better way.
-Cheers
indiajoe