On Fri, May 29, 1998 at 02:55:22PM +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/ ?
> >
> > basename `tty`
>
> [etc]
>
> Thanks to all for replies... I have lots of options
On 28 May 1998 [EMAIL PROTECTED] wrote:
> 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/ ?
>
> basename `tty`
[etc]
Thanks to all for replies... I have lots of options now.. thanks!
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/ ?
basename `tty`
--
John Hasler
[EMAIL PROTECTED] (John Hasler)
Dancing Horse Hill
Elmwood, WI
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
wi
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
/d
tty|cut -c6-
Bob
> From: [EMAIL PROTECTED] (Michael Beattie)
> Sender: [EMAIL PROTECTED] (Michael Beattie)
> Date: Thu, 28 May 1998 18:49:38 +1200 (NZST)
>
>
> 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. tt
Several ways, including piping the tty output to sed or cut or awk. But
my preference would be:
basename $(tty) # assumes you are using bash, ksh etc.
or
basename `tty` # back quotes for sh
---
Bob McGowan
i'm: bob dot mcgowan at artecon dot com
> -Original Message-
>
On Thu, 28 May 1998 [EMAIL PROTECTED] 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.
>
> tty | cut -c 6-
>
> =)
Thanks!
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 g
> 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-
=)
\EF
---
[EMAIL PROTECTED], 2:204/[EMAIL PROTECTED], Phone: +46-380-371 282,
Ce
9 matches
Mail list logo