renaming file extensions
i understand WHY this will not work, and i see many scripts on-line that do ALMOST the same thing, but not quite....
i want to rename all the files with exentsion: .bas-new to simply: .bas how can i do that. # called like: ./rename_script.sh *.bas-new #!/bin/bash for filename in "$@"; do rename *.bas-new *.bas done |
Part of the Pleasure of Linux is the challange. So here's the challenge. Study the use of grep and sed, and their use in a bash script.
Then, in your sudo code, change Quote:
Quote:
|
Have a look at the man page for rename (if your distro provides it). You could do something like:
Code:
rename 'bas-new' 'bas' *bas-new |
All times are GMT -5. The time now is 03:33 PM. |