Getting “command not found” error in bash script

The problem is that you are redefining the PATH variable where bash looks into to find the binary files if you don’t use a complete path when calling.

You should change the PATH in your bash script to MYPATH or something like that, so that it doesn’t mess with the already environmental variables.

If you don’t know what the PATH variable is for you can look at wikipedia’s article

Leave a Comment