[Help-bash] How to show the path of a bash script in $PATH?
From:
Peng Yu
Subject:
[Help-bash] How to show the path of a bash script in $PATH?
Date:
Sun, 5 Apr 2015 09:57:59 -0500
Hi,
`which` only shows the path if the command is an executable. What if a
bash script is in $PATH but it is just for `source` only (i.e., not
executable)? Is there an easy to find its path?
This can be done with `find` and a bit programming. But since bash is
able to resolve the path of a script for sourcing, I'd imagine there
might be a way to use this bash capability to directly get the path of
the script.
--
Regards,
Peng