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



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How do I establish a remote CDE or JDS session on Solaris 10? ultra0384 SUN Solaris 11 10-05-2006 05:23 PM
sqlplus session being able to see unix variables session within a script 435 Gavea Shell Programming and Scripting 2 07-03-2006 10:11 AM
mac 10.4>terminal>linux remote server>ssh login accepted>session closed-why? xprankard UNIX for Dummies Questions & Answers 0 01-21-2006 10:09 AM
Remote Dial-up Modem Printing With Out Cpu On The Remote Side! jayvee SUN Solaris 0 08-23-2005 08:23 AM
remote x session to a server box w/no IO SnakeO UNIX for Dummies Questions & Answers 2 03-13-2005 09:46 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-25-2008
raidzero's Avatar
raidzero raidzero is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 60
how to run who am i from remote session

I just moved from AIX 4 to AIX 5.3. the command `who am i` is essential to our logon scripts; but it does not work anymore, it says the process is not attached to a terminal. Is it possible to run this command remotely? It works for remote root sessions. If it is not is there another way to accurately determine the IP address the remote session is currently using? Thanks
  #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.
  #3 (permalink)  
Old 08-25-2008
broli's Avatar
broli broli is offline
Registered User
  
 

Join Date: Dec 2007
Location: Argentina
Posts: 215
have you tried
whoami ?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:50 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0