tty(1) DG/UX 4.30 tty(1)
NAME
tty - get the name of the terminal
SYNOPSIS
tty [ -sl ]
DESCRIPTION
Tty prints the pathname of the user's terminal. The -s
option inhibits printing of the terminal pathname, letting
you test just the exit code. The -l option prints a message
indicating whether or not your terminal is using a
synchronous line.
EXIT CODES
2 Invalid options were specified
0 Standard input is a terminal
1 Otherwise
EXAMPLES
$ tty
Prints your terminal line number on the standard output.
$ echo "TIME FOR LUNCH" > `tty`
Prints the string "TIME FOR LUNCH" on your terminal.
DIAGNOSTICS
"not a tty" if the standard input is not a terminal and -s
is not specified.
Licensed material--property of copyright holder(s) Page 1