I take it you didn't write this code heh.
Assuming it finds what you ~WANT~ it to find (which looking at it I suspect it's going to find a whole lot more than you want) deleting it would be as easy as changing the code to this (keep in mind, I would never execute this script or the resultant simple bash script to remove the files-- the results imo are not worthwhile or useful.)--
Code:
chmod o+x find-dupes.sh && ./find-dupes.sh /path/to/dir/to/check/for/dupes
Code:
OUTF=rem-duplicates.sh;
echo "#! /bin/sh" > $OUTF;
find "$@" -type f -exec md5sum {} \; |
sort --key=1,32 | uniq -w 32 -d --all-repeated=separate |
sed -r 's/^[0-9a-f]*( )*//;s/([^a-zA-Z0-9./_-])/\\\1/g;s/(.+)/rm \1/' >> $OUTF;
chmod o+x $OUTF; ls -l $OUTF
then run...
Code:
./rem-duplicates.sh
However, I DON'T recommend running this and before you ever run a script like this ensure you have good backups. Seriously.
I don't think this is going to do what you want... you can cat the rem-duplicates.sh file out to see what it is going to do exactly...