utility to determine rlogin?
Root Boy Jim
rbj at icst-cmr.arpa
Thu Jun 9 07:31:10 AEST 1988
From: Jerry Peek <jerryp at cmx.npac.syr.edu>
Then, I wrote a shell script named "ttykind". It took a tty name on the
commandline (default: current terminal) and output the tty kind from the
/etc/ttys file. For example, let's say I'm remotely logged in on /dev/ttyp3,
and /etc/ttys shows it as a "network" tty. Running "ttykind" will give:
% ttykind
network
So, setting up my .login was easy. I put a test like this one in it:
switch ("`ttykind`")
case network:
# do stuff for network login
case xxx:
# do stuff for xxx login
default:
Why not just do `switch ($term)'? You don't need ttykind, except for
finding out *other* peoples terminal types.
--Jerry Peek, Northeast Parallel Architectures Center, Syracuse, NY 13244
jerryp at cmx.npac.syr.edu
+1 315 423-4120
(Root Boy) Jim Cottrell <rbj at icst-cmr.arpa>
National Bureau of Standards
Flamer's Hotline: (301) 975-5688
The opinions expressed are solely my own
and do not reflect NBS policy or agreement
My name is in /usr/dict/words. Is yours?
More information about the Comp.unix.questions
mailing list