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

jim

----------
From:   [EMAIL PROTECTED]:[EMAIL PROTECTED]
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 ([EMAIL PROTECTED])

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


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to