Re: Getting current terminal ID

From: Michael Heiming (michael+USENET_at_www.heiming.de)
Date: 05/13/05


Date: Fri, 13 May 2005 20:42:56 +0200

In alt.os.linux skubik <shawn.kubik@gmail.com>:
> I'm writing a BASH script where I need to retrieve the current ID of
> the virtual terminal being currently used. That is, if I run the script
> from an xterm window, I would get a terminal id of 7-12, if I run it
> from a text-console terminal, I would get 1-6. I've searched around a
> bit but can't seem to find a way to do this. IS there a way to retrieve
> this ID?

Sure.;)

 man tty

Good luck

-- 
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 347: The rubber band broke


Relevant Pages

  • Getting current terminal ID
    ... I'm writing a BASH script where I need to retrieve the current ID of ... IS there a way to retrieve ... - skubik. ...
    (alt.os.linux)
  • Beginners?? Question
    ... How might one retrieve the path to the most recent entry in a ... directory to pass to something else in a bash script? ... To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org ...
    (Debian-User)
  • Testing for strings, and numbers
    ... I am writing a bash script and I would like to test $1 to see if it ... sections on string handling. ... Writings of "The" Schizophrenic, what it's like to be a schizo, and other ...
    (Ubuntu)
  • Re: Outlook Express Plugin
    ... <SNIP> ... > No. I'll have to retrieve it from my home computer and put it up. ... > database so you can do some processing based on that. ... > it can handle writing to the database. ...
    (borland.public.delphi.language.objectpascal)
  • RE: Is there a POP3 Mail Component?
    ... I am writing a program to retrieve and delete email messages through POP3. ...
    (microsoft.public.dotnet.languages.csharp)