"command not found" when running a shell script. What did I break?
Solution 1:
Absolutely nothing. Only executables in one of the directories in $PATH
can be run directly, and .
is (usually) never in $PATH
. Specify the path to the executable, i.e. ./grr.sh
.
Solution 2:
Is the location of grr.sh in the $PATH
variable? If not, you'll need to enter:
./grr.sh
if you are in the same folder as grr.sh. If not, then provide the full path to it.
Solution 3:
the permissions for the file are wrong. Try the following commands:
$ chmod 777 file.sh
$ ./file.sh