The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Operating Systems > HP-UX
.
google unix.com




Thread: How to logout
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #8 (permalink)  
Old 06-20-2009
scottn scottn is offline Forum Advisor  
VIP Member
  
 

Join Date: Jun 2009
Location: Zürich, CH
Posts: 1,104
Hey! That's quite cool!

But you need to qualify it...

i.e...


Code:
/root # 
/root # echo $0
-ksh
/root # echo $$
13898
/root # bash
/root # echo $$
13921
/root # ps -o "%P"
 PPID
13896
13898
13921
/root # ps -ef | grep 13[89][95]
root     13896     1  0 18:52 ?        00:00:01 /usr/bin/Terminal
root     13897 13896  0 18:52 ?        00:00:00 gnome-pty-helper
root     13898 13896  0 18:52 pts/0    00:00:00 -ksh
root     13951 13898  0 18:54 pts/0    00:00:00 bash
root     13973 13951  0 18:55 pts/0    00:00:00 ps -ef
root     13974 13951  1 18:55 pts/0    00:00:00 grep 13[89][95]