Created
April 15, 2019 16:02
-
-
Save uilian/e9cbaee167513d0ce256a059f79d5689 to your computer and use it in GitHub Desktop.
Multi-rename files
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
# Assembles the old and new names, in the following example the name has 3 parts | |
# The NR adds a linenumber to the new name. | |
s ls pattern_file_name* | awk '{print "mv " $1"\\ "$2"\\ "$3" " $1 NR $3 }' | bash $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment