Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!romp!auschs!awdprime!greenber.austin.ibm.com!jfh From: jfh@greenber.austin.ibm.com (John F Haugh II) Newsgroups: comp.unix.aix Subject: Re: REMOTEHOST Message-ID: <6034@awdprime.UUCP> Date: 20 Mar 91 23:53:04 GMT References: <1991Mar20.185405.5746@nrcnet0.nrc.ca> Sender: news@awdprime.UUCP Organization: Best Care South of the Red River, LCC, Austin, Republic of Texas Lines: 21 In article <1991Mar20.185405.5746@nrcnet0.nrc.ca> ng@cfd.di.nrc.ca writes: >In AIX/RS6000, is there a way to find out from where you are actually >login'ed ? In other unix like Iris, there is conveniently a shell >variable REMOTEHOST set for you. However I can't find anything equivalent >in aix. You can get this information either from /etc/utmp (if you are looking for a C solution) or straight out of the "who" command if shell will do for you. This is what I get on this machine - % who | grep jfh jfh pts/9 Mar 20 16:01 (snowball.austin.) Regrettably you don't get all of it because the u_host field is only 16 characters long. -- John F. Haugh II | I've Been Moved | MaBellNet: (512) 838-4340 SneakerNet: 809/1D064 | AGAIN ! | VNET: LCCB386 at AUSVMQ BangNet: ..!cs.utexas.edu!ibmchs!auschs!snowball.austin.ibm.com!jfh (e-i-e-i-o)