bash script generates error "No such file or directory".
by nelson1387 from LinuxQuestions.org on (#5QYJM)
Hello:
I have a script that renames files in the current directory.
#!/bin/bash
mv file01.jpg newfile01.jpg
mv file02.jpg newfile02.jpg
.
.
.
mv filenn.jpg newfilenn.jpg
When I run the mv command from terminal, the command works. When I run a script, it comes back with No such file or directory. When I execute from Finder the error is No such file or directory for each command. Have I missed a step in creating the script?
I have a script that renames files in the current directory.
#!/bin/bash
mv file01.jpg newfile01.jpg
mv file02.jpg newfile02.jpg
.
.
.
mv filenn.jpg newfilenn.jpg
When I run the mv command from terminal, the command works. When I run a script, it comes back with No such file or directory. When I execute from Finder the error is No such file or directory for each command. Have I missed a step in creating the script?