Created
August 4, 2020 04:52
-
-
Save fcicq/d8a13df40edcd308aede1f0b76a893d3 to your computer and use it in GitHub Desktop.
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/sh | |
for file in "$@"; do | |
[ ! -f "$file" ] && continue | |
t="$(file "$file" --mime-type -b)" | |
if [ "$t" = "video/x-ms-asf" ]; then | |
mv -i "$file" "${file%.*}.wmv" | |
fi | |
if [ "$t" = "video/mp4" ]; then | |
mv -i "$file" "${file%.*}.mp4" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment