[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] How to Who?



Greetings --
I have a script called 'comefrom' which reads as follows:

#!/bin/sh
who | grep ${LOGNAME} | head -1 |\
sed 's:^[^(]*(\([^)]*\).*$:\1:'

I use 'comefrom' for apps which execute rsh commands on a system on which I
have 'rlogin' activity, to pipe or execute things back to my local station.
On our Sun, this works fine, returning my login site.  Under my 1.2.13
Linux, in truncates the results:

Sun:
% comefrom

On our Sun, this works fine, returning my login site.  Under my 1.2.13
Linux, in truncates the results:

Sun:
% comefrom
station_name.gtri.gatech.edu
%

Linux:
%comefrom
station_name.gtri.ga
%

What could I do in order that my script return a complete qualified
domain name in Linux?  The truncation takes place in 'who' and the
sed line does not seem to be the problem.

Thanks --jmm--

John M. Mills, Senior Research Engineer   --   john.m.mills at gtri.gatech.edu
   Georgia Tech Research Institute, Georgia Tech, Atlanta, GA 30332-0853
        Phone contacts: 770.528.3258 (voice), 770.528.7083 (FAX)
        EMACS: 'Eight Megabytes And Constantly Swapping' -- anon