Skip to content

Instantly share code, notes, and snippets.

@dipeshhkc
Created February 25, 2021 09:39
Show Gist options
  • Save dipeshhkc/04a9e22232aee422e45c8e1efafd14e5 to your computer and use it in GitHub Desktop.
Save dipeshhkc/04a9e22232aee422e45c8e1efafd14e5 to your computer and use it in GitHub Desktop.
for f in *.png ; do
if [[ $(file -b --mime-type "$f") = image/jpeg ]] ; then
mv "$f" "${f/%.png/.jpeg}"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment