finding out what terminal you are logged into under VP/ix
Harley Hahn
harley at cs.utexas.edu
Wed Jul 11 08:18:57 AEST 1990
Here is a neat trick.
I wanted to set my DOS prompt under VP/ix to tell me what
terminal I was logged in to.
However, there is no way to directly access this information
from DOS and there is no way (that I could find) to set a DOS
variable from Unix.
But, here's how you can do it.
Create a directory, call it, say, WHEREAMI.
In your AUTOEXEC file, change to WHEREAMI and delete
all the files.
Then, execute the following Unix command. Even though it is in
a DOS batch file, VP/ix will make it work:
touch `basename \`tty\``
This will create a file with the name of your terminal,
VT01, VT02, CONSOLE, or whataver.
Next, use the IF EXIST statement to find which of these
files exists and set the prompt accordingly.
I have tested this and it works.
More information about the Comp.unix.i386
mailing list