Technique number | Command | permissions | Subprocess created? |
1 | Myscript | r-x | Yes:runs as a child process of the current shell |
2 | /bin/sh myscript | r-- | Yes:runs as a child process of the current shell |
3 | . myscript | r-- | No:runs inside the current shell |
chmod +x /path/to/yourscript.sh
/path/to/yourscript.sh
./yourscript.sh