sorry forgot to mention cant use who as this is not from console
---------- Post updated at 11:20 PM ---------- Previous update was at 10:12 PM ----------
Let me add some more details to this ,
by command A)"finger $LOGNAME" I can get all session for the user as shown below
by command B)" a=`tty | sed 's_/dev/__'` ; finger $LOGNAME | grep $a " I can get my logged in terminal ,
but dont know how to extrat the next line "from <localhost>"
A)command prompt-> finger $LOGNAME
Login name: <loginname> In real life: <name>
Site Info: <sit info>
Directory: <homedir> Shell: /bin/ksh
On since Jan 27 01:37:28 on pts/0
from <localhost>
On since Jan 27 04:02:39 on pts/1, 4 minutes 19 seconds Idle Time
from <localhost>
No Plan.
B)command prompt-> a=`tty | sed 's_/dev/__'` ; finger $LOGNAME | grep $a
On since Jan 27 01:37:28 on pts/0
Moderator's Comments:
|
|
Please use next time code tags for your code and data
|
|