Operating System - HP-UX
1836585 Members
2403 Online
110102 Solutions
New Discussion

Re: get IP address of workstation when REXEC

 
SOLVED
Go to solution
Donny Jekels
Respected Contributor

get IP address of workstation when REXEC

I use, rexec with reflection from my PC to access our boxes.

Does anyone know how to read your IP address of your workstation as you login?

Donny
"Vision, is the art of seeing the invisible"
3 REPLIES 3
Steve Steel
Honored Contributor
Solution

Re: get IP address of workstation when REXEC

Hi


set -- $(who -Rm)
Machine=${6#\(}
Machine=${Machine%\)}
nslookup $Machine|strings|tail -n 1|
cut -f2 -d":"

Will work in a script and should give you enough.


Steve Stee
If you want truly to understand something, try to change it. (Kurt Lewin)
A. Clay Stephenson
Acclaimed Contributor

Re: get IP address of workstation when REXEC

When you know the hostname, it's nothing more than 'getip hostname'.
If it ain't broke, I can fix that.
Donny Jekels
Respected Contributor

Re: get IP address of workstation when REXEC

thanx, it worked!

however I don't know the workstation and are building a friendly .profile for my users.

Donny
"Vision, is the art of seeing the invisible"