There are not 36,000 solutions:
1) absolute path :
source /absolute_path/script.sh # sourcing a script
. /absolute_path/script.sh # sourcing a script
/absolute_path/script.sh # executing a script
2) relative path :
./script.sh # when script.sh is in the current directory
./dir/script.sh # when script.sh is in the directory 'dir' which is in the current directory
../script.sh # when script.sh is in the parent directory
And you could use source
or . script.sh
with relative path too.
3) use alias :
echo "alias script='/absolute_path/script.sh'" >> ~/.bashrc
source ~/.bashrc
script # executing script.sh
4) add to the PATH :
echo "export PATH=$PATH:/absolute_path/script.sh" >> ~/.bashrc
source ~/.bashrc
script.sh # executing script.sh
And to know the difference between sourcing a script and executing a script, see this subject.