Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!nrl-cmf!cmcl2!brl-adm!adm!rbj@icst-cmr.arpa From: rbj@icst-cmr.arpa (Root Boy Jim) Newsgroups: comp.unix.questions Subject: utility to determine rlogin? Message-ID: <16109@brl-adm.ARPA> Date: 8 Jun 88 21:31:10 GMT Sender: news@brl-adm.ARPA Lines: 32 From: Jerry Peek 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@cmx.npac.syr.edu +1 315 423-4120 (Root Boy) Jim Cottrell 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?