Subject: Re: How do you get the tty your logged in on in a sh shell script?
To: None <JohnAM@datastorm.com>
From: Mike Long <mike.long@analog.com>
List: netbsd-help
Date: 11/21/1995 13:58:36
>From: John Maier <JohnAM@datastorm.com>
>Date: Tue, 21 Nov 95 12:00:00 PST
>With csh I can get the port I'm logged in on vi a set but there isn't
>anything like that in sh's environment, is there?
Sure there is:
MYTTY=`/usr/bin/tty`
Be sure to watch out for the 'not a tty' case. :-)
--
Mike Long <mike.long@analog.com> http://www.shore.net/~mikel
VLSI Design Engineer finger mikel@shore.net for PGP public key
Analog Devices, CPD Division CCBF225E7D3F7ECB2C8F7ABB15D9BE7B
Norwood, MA 02062 USA assert(*this!=opinionof(Analog));