Created
March 25, 2013 11:32
-
-
Save acallaghan/5236544 to your computer and use it in GitHub Desktop.
Batch rename files with preview
This file contains hidden or 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
| # List all .rb file beginning with v1_ and change too bar_*.rb | |
| ls v1_*.rb | awk '{print("mv "$1" "$1)}' | sed 's/v1_/bar_/2' | |
| # The same as above, but commit the changes | |
| ls v1_*.rb | awk '{print("mv "$1" "$1)}' | sed 's/v1_/bar_/2' | /bin/sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment