This manual page
documents the GNU version of
tty .
tty
prints the file name of the tty connected to its standard input. It
prints `not a tty' if the standard input is not a tty. Its exit
status is:
0 if the standard input is a tty
1 if the standard input is not a tty
2 if given incorrect arguments
3 if a write error occurs