thank you already
who -R is not working, I am on SINIX ( older Siemens UNIX version)
who -u shows me all the users and the terminal.
I need the station ( is available in finger )
I do not know the awk but it works.
However, this works when the user has 1 session.
He can have more sessions: the virtual terminal is then different and it is important to have the correct terminal-workstation info
as far as logic i had thefollowing in mind
with who am i: i find the virtual terminal
with finger user: i find the several sessions and corresponding terminals and workstations
with ? grep or other I take the correct line based on the terminal from who am i
with cut I take the workstation info out of that line
It would be better idea to put here exactly what you are looking for rather telling us how you want to acheive it, because you mentioned earlier that you are looking for to get the station name from where user is initiating the connection and I think the command which I have given you suffice your requiremnt, can you please post here your exact requirements.
I try to be more clear:
below is the output of finger gxb
$ finger gxb
Login name: gxb
Directory: /home/gxb Shell: /sbin/ksh
On since Jan 22 15:05:31 on pts/4 from BS-013
1 hour 13 minutes Idle Time
No unread mail
No Plan.
Login name: gxb
Directory: /home/gxb Shell: /sbin/ksh
On since Jan 23 10:58:52 on pts/10 from BS-013
11 minutes Idle Time
Login name: gxb
Directory: /home/gxb Shell: /sbin/ksh
On since Jan 23 11:03:02 on pts/11 from BS-013
23 minutes Idle Time
Login name: gxb
Directory: /home/gxb Shell: /sbin/ksh
On since Jan 23 11:26:14 on pts/12 from BS-014
18 seconds Idle Time
as you can see I connect several sessions ( pts/4 pts/10 pts/11 pts/12) from several locations BS-013 BS-014