From owner-freebsd-questions Sun Oct 20 09:40:16 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA29786 for questions-outgoing; Sun, 20 Oct 1996 09:40:16 -0700 (PDT) Received: from diablo.ppp.de (diablo.ppp.de [193.141.101.34]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id JAA29777 for ; Sun, 20 Oct 1996 09:40:13 -0700 (PDT) From: Greg Lehey Received: from freebie.lemis.de by diablo.ppp.de with smtp (Smail3.1.28.1 #1) id m0vF0tY-000QobC; Sun, 20 Oct 96 17:38 MET Received: (grog@localhost) by freebie.lemis.de (8.8.2/8.6.12) id SAA13323; Sun, 20 Oct 1996 18:35:56 +0200 (MET DST) Organisation: LEMIS, Schellnhausen 2, 36325 Feldatal, Germany Phone: +49-6637-919123 Fax: +49-6637-919122 Message-Id: <199610201635.SAA13323@freebie.lemis.de> Subject: Re: which vt? In-Reply-To: from hmmm at "Oct 16, 96 09:13:54 pm" To: hmmm@alaska.net (hmmm) Date: Sun, 20 Oct 1996 18:35:56 +0200 (MET DST) Cc: questions@freebsd.org X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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