The following are two shell scripts stored in the same folder with execute permissions on both:
shell1.sh
#!/bin/bash
exec shell2.sh
shell2.sh
#!/bin/bash
pwd
When trying to execute shell1.sh I am getting the following error:
./shell1.sh: line 3: exec: shell2.sh: not found
Is there something I am doing incorrectly? This works in other machines though but just in one particular server its not working.
Any suggestions would be helpful.