Created
June 15, 2021 08:19
-
-
Save cengizhancaliskan/aec0d674af1996f25aff02fb01faea90 to your computer and use it in GitHub Desktop.
Png to 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
#!/bin/bash | |
dir="/Users/$USER/images" | |
find $dir -type f -name '*.png' -print0 | while IFS= read -r -d '' file; do | |
convert "$file" "${file%.*}.jpg" | |
rm -f $file | |
echo "$file converted" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment