I'm new with Linux,
awk but I don't mind challenging myself on new ideas. That being said, I understand the purpose and how to use
sed for a common event such as adding a
$date or removing a
_1234 from all the files. However, I want to figure out how to rename 100's of files that have no relation to one another other than the file type.
- old name alpha.ai renamed to omega.ai
- old name pie32.ai renamed to apple.ai
- old name xmas.ai renamed to santa.ai
I originally used a bash script to pull all the names to a .csv file and placed them in column A. In column B I wrote in the new names. Now since there is not a common event occurring how could you write
sed or the like to do this??
#!/bin/bash for i in *.ai do mv $i $(echo $i | sed "a1,b1") done