Rename files in any folder using single command on shell
If you have a number files named .myi, and want to rename them like .MYI. Following command will achieve this.
\ls *.myi | sed 's/\(.*\).myi/mv & \1.MYI/' | sh
Backslash in the start of command prevents ls from being expanded , in case that ls is an alias (Such as Bash). We want to prevent the shell from doing the expansion since ls might come out as ls -l which would behave strage. Above command uses advanced commnads of sed.
|