TTY(C) UNIX System V
Name
tty - gets the terminal's name
Syntax
tty [ -s ]
Description
The tty command prints the pathname of the user's terminal
on the standard output. The -s option inhibits printing,
allowing you to test just the exit code.
Exit Codes
0 if the standard input is a terminal, 1 otherwise.
Diagnostics
not a tty If the standard input is not a terminal and -s
is not specified
Standards Conformance
tty is conformant with:
AT&T SVID Issue 2, Select Code 307-127;
and The X/Open Portability Guide II of January 1987.
(printed 2/15/90) TTY(C)