Skip to content

Instantly share code, notes, and snippets.

@craiglondon
Created March 3, 2016 21:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save craiglondon/15107556eec481c57b59 to your computer and use it in GitHub Desktop.
Save craiglondon/15107556eec481c57b59 to your computer and use it in GitHub Desktop.
Rename file extension, upper to lower
### http://stackoverflow.com/questions/8899135/renaming-multiples-files-with-a-bash-loop
### Author: Craig V London
### Date: 03/03/2016
### Purpose: I wanted to rename the extension of some files, from upper to lower
### Written for use in CygWin, but should work on most Linux installs
for i in *XEN
do
NEWNAME="${i/%.XEN/.xen}"
mv -- "$i" "$NEWNAME"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment