I'm making a game to help learn commands and I have directories that will all have the same number of files of different types in them. I need to be able to change part of the file name in each directory so it signifies that it is in deed a file from that directory.
Dir 1 name "Orange" file 1 name: "water_orange.jpeg" file 2 name: 1_water_orange.jpeg" etc, etc 15 files
Dir 2 name "Indigo" file 1 name: "water_indigo.jpeg" file 2 name: "1_water_indigo.jpeg" etc etc 15 files
I have 7 directories with 15 files in each and I want to see if it's possible to change the colour part of the file name in each directory, without have to use the "mv" command on each individual file.
I've tried the "echo sed" command with both single and double quotes but no luck
i.e. echo sed "s/orange/indigo/g" and echo sed 's/orange/indigo/g'
any help sincerely appreciated