-
-
Save micksmix/a41f7a5397d72f0c5ba3ba10177d30b5 to your computer and use it in GitHub Desktop.
Bash script that converts .HEIC to .jpg files
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 | |
set -eu -o pipefail | |
count=$(find . -depth 1 -name "*.HEIC" | wc -l | sed 's/[[:space:]]*//') | |
echo "converting $count files .HEIC files to .jpg" | |
magick mogrify -monitor -format jpg *.HEIC | |
echo "Remove .HEIC files? [y/n]" | |
read remove | |
if [[ "$remove" == "y" ]]; then | |
find . -depth 1 -name "*.HEIC" -delete | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment