Created
March 3, 2016 21:28
-
-
Save craiglondon/15107556eec481c57b59 to your computer and use it in GitHub Desktop.
Rename file extension, upper to lower
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
### 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