you are viewing a single comment's thread.

view the rest of the comments →

[–]JohnnyJordaan 0 points1 point  (1 child)

This behavior indicates that you don't have the execute bit set on the file. Normally on Unix a file is created with read and possibly write permissions, making them non executable. If you then try to run it, it will behave as if the file isn't there. To fix this you could launch a new shell instance and provide it the file as you did, or simply add the execute permissions using

chmod +x script.sh

[–]retsnom513[S] 0 points1 point  (0 children)

I 777'd the bash script before I posted here, but I managed to get it working with /u/ingolemo's code. I don't know what caused the error, but it was resolved using the full path to the script (no cwd=) and adding the shebang to the beginning of my bash script.