So it's not the files executable status (at least I don't think so) Tried the file on a few different drives, but still nothing.
We'll need more details than that, for anyone here to have a chance of diagnosing it.
Please post the complete actual command-lines you used in Terminal, along with the complete error messages that were output. It's possible you entered the wrong commands, or did something else wrong, which might fail for a completely different reason than the reason for the shell script failing.
There's no way of evaluating the correctness of what you did, without knowing exactly what you did. If you don't have the commands any more, then there's no way to know exactly what was done.
Discovering why the shell script won't run is going to take some digging and diagnostics.
First, we need to see if there's a restriction on your networked login directory that prevents execution.
Enter the following command (copy and paste it into a Terminal window):
Then, copy and paste the complete output into a reply post.
For readability, enclose all posted output in CODE tags,
as described here.
Second, post the output of this command:
Third, run a test as follows. Copy and paste these exact command-lines into a Terminal window:
Code:
cd ~
echo '#!/bin/bash' >test.sh
echo "echo '-- Example' \$\$" >>test.sh
chmod a+x test.sh
./test.sh; ~/test.sh
The above commands should make a file named "test.sh" in your home folder. It will then try and run it as a shell script. If it runs, it will output two lines containing "-- Example" followed by a number.
Whether the script runs or not, copy and paste the entire output in a reply post, enclosed in CODE tags as noted above.