Guest_imported
New member
- Jan 1, 1970
- 0
Hi i am currently writing a shell script, to do a batch rename of files. I want to execute the script and pass as parameters the files i want to rename, with the last being the target to rename the rest ie
fileRename fred.doc barney.txt simon.dnr *.com
to rename all files to .com
i need to validate the parameters to ensure no files apart from the target contain a '*' how can i do this. i tried using a if statement but cant get it to recognise a literal '*'. can i do this using a case statement?
thanks for any help, brian
fileRename fred.doc barney.txt simon.dnr *.com
to rename all files to .com
i need to validate the parameters to ensure no files apart from the target contain a '*' how can i do this. i tried using a if statement but cant get it to recognise a literal '*'. can i do this using a case statement?
thanks for any help, brian