Re: Getting ttyx

1998-05-29 Thread Rev. Joseph Carter
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

Re: Getting ttyx

1998-05-29 Thread john
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]

Re: Getting ttyx

1998-05-29 Thread Michael Beattie
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!

Re: Getting ttyx

1998-05-29 Thread Rev. Joseph Carter
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 now..

Re: Getting ttyx

1998-05-28 Thread forsberg
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,

RE: Getting ttyx

1998-05-28 Thread Lewis, James M.
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

Re: Getting ttyx

1998-05-28 Thread Michael Beattie
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!

RE: Getting ttyx

1998-05-28 Thread Bob McGowan
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-

Re: Getting ttyx

1998-05-28 Thread Bob Hilliard
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. tty1,