determining port id

Bob Daniel rad at genco.bungi.com
Fri Mar 22 04:20:20 AEST 1991


In article <1991Mar19.171708.18628 at wciu.EDU> george at wciu.wciu.edu (George Peavy) writes:
>
>What I have so far:  I'm using Bourne shell on AT&T Sys V 3.0 running on a 
>Unisys 6000/51 platform.  I can get the port id with,
>
>	who am i | awk '{ print $2 }'
>

This is how I do it...

device=`tty`
port=`basename $device`
echo $port


The "`" are accent marks, not single quotes.  I'm on AT&T SysV 3.2.3.
This is also more accurate than using 'who am i' when using 'layers'.



More information about the Comp.unix.questions mailing list