Say I have ~/scripts
in my $PATH
and I have script.sh
inside that path.
I can execute that script by typing script.sh
directly in the terminal, but what if I want to print out the full path of that script without knowing the base path of the script (or added any function inside the script to print out its own path)? Are there any good ways to do this?