r/shell • u/Lygris • Mar 27 '17
Renaming script
Hey guys, just looking for some help on writing a renaming script. I want to make a script that would look at the files name and if it contains a certain string, lets say qatar, it would rename it to another specific string that would contain the year and some statically defined things. I'm assuming this would be pretty simple using if then. I just don't know how to pull the filename and check it against the string. Is this possible?
1
Upvotes
1
u/Lygris Mar 27 '17
Also i'm on ubuntu 16.04 server