On Thu, May 28, 1998 at 06:49:38PM +1200, Michael Beattie wrote:
> 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.

Whelp, here's a thought:

~$ tty
/dev/ttyp4
~$ tty | sed s}/dev/}}g
ttyp4
~$

Attachment: pgpGzG2xpYKUz.pgp
Description: PGP signature

Reply via email to