Created
January 6, 2016 14:45
-
-
Save elston/36a03f750b6ded153c5f to your computer and use it in GitHub Desktop.
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
| #!/bin/bash | |
| src="./$1/src/" | |
| fix="./$1/fix/" | |
| a=`ls $src|sort -V` | |
| i=0 | |
| for fullfile in $a; do | |
| filename=$(basename "$fullfile") | |
| extension="${filename##*.}" | |
| # ... | |
| if [[ $extension == 'jpg' ]]; then | |
| ((i++)) | |
| printf -v j "%05d" $i | |
| ffix=$fix"$j".JPG | |
| fsrc=$src"$fullfile" | |
| #... | |
| convert -rotate -90 "$fsrc" "$ffix" | |
| echo "$fsrc" "$ffix" | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment