Proposal:
You have a small test1.sh shell script that calls a second test2.sh script. In the second
script you want to find out what the name of the first calling script is.
Currently, if you use the ps command within the second script you only get
"bash" as command name but not the real name of the calling script, in this case
it would be test1.sh. If you use ps -Hc, where "c" is supposed to mean real
command name, still shows "bash".
PID TTY TIME COMMAND
29763 pts/1 00:00:00 bash
14387 pts/1 00:00:00 bash
14389 pts/1 00:00:00 bash
14392 pts/1 00:00:00 ps
14388 pts/1 00:00:00 more
Hugo Zambrano
RMS Team Leader
Show replies by date