I have a problem where by I need to remane a file by moving it to another location. For instance I have a file called
change.txt
changeA.txt
changeB.txt
and I need to change the name to
change_a1.txt
changeA_a2.txt
changeB_a3.txt
I need a sed regular expression that changes the name i.e. basically before the dot put _a1 and then put .txt again.