I have A.js
, B.js
, C.js
in a certain directory and I want to write a SINGLE command line in bash shell to rename these files _A, _B, _C. How can I do this?
I tried find -name '*.sh' | xargs -I file mv file basename file .sh
but it doesn't work, basename file .sh isn't recognized as a nested command
basename file .sh
but it doesn't work, basename file .sh isn't recognized as a nested command – andPat Mar 13 '13 at 8:30