Created
January 1, 2013 01:34
-
-
Save anonymous/4424601 to your computer and use it in GitHub Desktop.
If you have a bunch of raw/jpg pairs in a directory, this script will remove the raw files that do not have a corresponding jpg.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for raw_file in *.CR2; do; \ | |
jpg_file=`echo $raw_file | sed -e 's/CR2$/JPG/'`; \ | |
if [ ! -f $jpg_file ]; then; | |
rm $raw_file; | |
fi; | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment