Created
November 24, 2014 20:44
-
-
Save SBejga/f60d24b44a8257bd8d6f to your computer and use it in GitHub Desktop.
Lightroom Raw+JPG Remover of JPG files
This file contains 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
#!/bin/bash | |
#change this to folder with target files/folders inside. | |
root=~/Pictures/2014 | |
for f in $(find $root -name '*.CR2' -or -name '*.ARW'); | |
do | |
fname=`echo $f | cut -d\. -f1` | |
if [ -e $fname.jpg ] | |
then | |
rm $fname.jpg | |
elif [ -e $fname.JPG ] | |
then | |
rm $fname.JPG | |
elif [ -e $fname.jpeg ] | |
then | |
rm $fname.jpeg | |
elif [ -e $fname.JPEG ] | |
then | |
rm $fname.JPEG | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment