Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Bash function to change the extension on all files in current folder.
function chext() {
origExt=$1
newExt=$2
for f in *"${origExt}"; do
mv -- "$f" "${f%.$origExt}.$newExt"
done
return
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.