Advertisement
wandrake

Untitled

Aug 28th, 2011
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.40 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. for file1 in ./*.mp3; do
  4.     echo "Finding match for $file1"
  5.     m1=`md5sum "$file1" | sed 's/ .*//g'`
  6.     for file2 in ./Sciolte/*.mp3; do
  7.         #echo "Evaluating $file2"
  8.         m2=`md5sum "$file2" | sed 's/ .*//g'`
  9.         #echo $m1 $m2
  10.         if [ $m1 = $m2 ]; then
  11.             echo MATCH: $file1 $file2
  12.             rm "$file2"
  13.             break
  14.         fi
  15.     done
  16. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement