What does BASH_SOURCE do? The documentation at http://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html is really vague, so you really need to try it.
vi a.sh:
echo ${BASH_SOURCE[0]} source b.sh
vi b.sh:
echo ${BASH_SOURCE[0]} ${BASH_SOURCE[1]}
/tmp$ source a.sh
rhu@rhu-linux:/tmp$ source a.sh a.sh b.sh a.sh
good one
ReplyDeletejudi sabung ayam
ReplyDeleteAyam Laga Bangkok
ReplyDelete