[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: Getting ttyx



try something like:
	mytty=$(basename $(tty))
	echo $mytty

jim

----------
From: 	mickyb@es.co.nz[SMTP:mickyb@es.co.nz]
Sent: 	Thursday, May 28, 1998 2:49 AM
To: 	Debian User List
Cc: 	The recipient's address is unknown.
Subject: 	Getting ttyx


What is the best way to get the current console's tty? I know tty does the
job, but how do I find the name WITHOUT the /dev/ ? i.e. tty1, tty2, tty3
etc? I want to use it with bl in a script.


                       Michael Beattie (mickyb@es.co.nz)

-------------------------------------------------------------------------------
            Curiousity may kill the cat, but a 12 gauge is quicker!
-------------------------------------------------------------------------------
                Debian GNU/Linux....  Ooohh You are missing out!


--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: