I'm getting command not found errors on all my scripts I try to run since upgrading. For instance if I navigate to a directory in terminal and then try to execute a script I receive this error. The scripts do have executable permissions.
I did mess around with my path at one point, I don't know if I've messed it up somehow?
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin"
fi
Update
If I run the scripts with "bash" in current dir in the terminal the scripts run i.e. bash myscript
, however without it I still get command not found error. Would this imply bash is no longer in my path? If so how do I fix this?
Results of echo $PATH
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
#!/bin/bash
and another script has#!/bin/sh
. Runningls -l
on one of the scripts gives-rwxrwxrwx
. If you look at my question i've updated with teh results ofecho $PATH
. Am I right in saying/bin/bash
should be in the results but isn't?