Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mac address remote Pc Sco Unix

Status
Not open for further replies.

dellit

IS-IT--Management
Jan 21, 2007
65
0
0
IT
Hi,
I need to take the mac-address of PC connected to the server Sco Unix.
With the command "who -ux" catch login and ip address;
With the command "arp -a" catch ip address and mac-address;

How do I take it all with single command or script?

Thanks for the support.
 
#!/bin/ksh
who -ux|grep ttyp|while read a b c d e f g
do
echo $a $b $c $d $e `arp $f`
done
 
Hi kitaman,
thanks for the reply.
Problem is solved!!!
 
Perhaps is too late for this answer ... but I use this (one single line):

Code:
arp -n `who -mx|cut -c38-53`|cut -d \  -f 4
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top