Created
March 2, 2014 02:52
-
-
Save kevonc/9301174 to your computer and use it in GitHub Desktop.
One-line batch file rename
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
To Change [1] to .jpg in all your files | |
First, lets display the output to make sure it is correct | |
ls * | awk '{print("mv "$1" "$1)}' | sed 's/\[1\]/.jpg/2' | |
If it looks right, pipe the output to shell to execute | |
ls * | awk '{print("mv "$1" "$1)}' | sed 's/\[1\]/.jpg/2' | /bin/sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment