The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 08-25-2008
raidzero's Avatar
raidzero raidzero is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 60
I solved my own problem, found out $$ is the PID of the current sesison, so instead of
Code:
who am i | awk '{print$6}'
I simply did
Code:
who -u | grep $$ | awk '{print$8}'
works great and everything is rolling along as it should again.