@maybeJosiah
There is a mistake: PATH contains the
directories of executables.
If you have an executable /path/to/your/file.sh
then it must be
Code:
export PATH=$PATH:/path/to/your
for bash.
This is good for .profile (common to bash and sh) or .bash_profile (bash only).
It depends on your distro if/when a .profile is used.
Otherwise put it in .bashrc that is always run when a bash starts. To avoid multiple addings in nested shells I would go for
Code:
addp=$HOME/bin
case ":$PATH:" in
( *":$addp:"* )
;;
( * )
export PATH=$PATH:$addp
mkdir -p "$addp"
esac
unset addp
It only adds $HOME/bin to the PATH if it's not yet there.
Many distros have $HOME/bin by default. Then you simply move your executables there.
Code:
mv myexecutable $HOME/bin/