Skip to content

Instantly share code, notes, and snippets.

@ttscoff
Last active February 20, 2025 09:58
Show Gist options
  • Save ttscoff/5157834 to your computer and use it in GitHub Desktop.
Save ttscoff/5157834 to your computer and use it in GitHub Desktop.
# batch change extension
chgext() {
for file in *.$1 ; do mv $file `echo $file | sed "s/\(.*\.\)$1/\1$2/"` ; done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment