ps -Hc --- enhancement

Zambrano,Hugo ZambranoH at ottawapolice.ca
Fri Mar 27 11:58:41 UTC 2009


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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 2187 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20090327/3c046f8f/attachment.bin>


More information about the fedora-devel-list mailing list