Originally Posted by burninGpi
for file in *.jpg
mv "$file" "wa$file"
What would the login look like if I already had files that had "wa" appended to them and some of them without and I only want to change the filename that do not have "wa". Also, it would do the same for both jpeg and jpg files. For instance:
So, I guess I want this in pseudocode:
for every file that has the extension "jpg" or "jpeg"
if file does not already have "wa" in front of file