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

Re: 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.

tty | cut -c 6-


forsberg@audiophile.com, 2:204/536.2@fidonet, Phone: +46-380-371 282, 
Cellular: +46-70-6835919, http://www.lysator.liu.se/~forsberg/

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

Reply to: