I am trying to rename a file first_second.pdf into first_0second.pdf
So, I read about capturing and back reference. But somehow it doesnt work. Can anyone tell me what I am doing wrong?
rename 's/\(.*_\)\([1-9]\).pdf$/$10$2.pdf/' first_1.pdf
I am expecting first_1.pdf to renamed to first_01.pdf