Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Oct 1996 18:35:56 +0200 (MET DST)
From:      Greg Lehey <grog@lemis.de>
To:        hmmm@alaska.net (hmmm)
Cc:        questions@freebsd.org
Subject:   Re: which vt?
Message-ID:  <199610201635.SAA13323@freebie.lemis.de>
In-Reply-To: <Pine.SOL.3.91.961016210933.26573A-100000@calvino> from hmmm at "Oct 16, 96 09:13:54 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
hmmm writes:
>
> can a SH script figure out what vt it is being viewed on?

Sure.  tty(1) tells you just that:

$ tty
/dev/ttyp7

This is a pty, of course, but it works just as well on vts.  If it's
not on a tty, you get things like:

$ rsh allegro tty
not a tty

Greg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610201635.SAA13323>