I need some help with a bash script. I have thousands of files that need certain words removed from their names. I have an input file of those words that need to be removed. I would like to use the
renamecommand in a script with the contents of each line in the input file to replace manual commands:
Code: Select all
rename "s/word_1//g" * rename "s/word_2//g" * rename "s/Word_3//g" * rename "s/WORD_4//g" *
rename "s/word_1//g" *.
Can anyone help me with this or set me off in the right direction, please?
I've done the obGoogle search but I'm getting scripts that use an input file with more than one parameter, and scripts that use
mv. I don't know enough about scripting to be able to modify these scripts to do what I've described.
All suggestions, except rude ones, are welcome.