[kwlug-disc] bash - file renaming

Khalid Baheyeldin kb at 2bits.com
Thu Sep 26 12:09:03 EDT 2019


When I want to rename a limited number of files (~ 20) in a certain
way, I sometimes do this:

# Get list of certain files, and construct a script with mv
ls *SOMETHING* | awk '{print "mv ", $1, $1}' > x
# I then edit the file x to change what I want
# Then execute it
sh x




More information about the kwlug-disc mailing list