TTY(1) UNIX Programmer's Manual TTY(1) NNAAMMEE tty - return user's terminal name SSYYNNOOPPSSIISS ttttyy [ -s ] DDEESSCCRRIIPPTTIIOONN The _t_t_y utility writes the name of the terminal attached to standard input to standard output. The name that is written is the string returned by _t_t_y_n_a_m_e(3). If the standard input is not a terminal, the message ``not a tty'' is written. The options are as follows: -s Don't write the terminal name; only the exit status is affected when this option is specified. The -_s option is deprecated in favor of the ``test -t 0'' command. _T_t_y exits 0 if the standard input is a terminal, 1 if the standard input is not a terminal, and >1 if an error occurs. SSEEEE AALLSSOO test(1), ttyname(3) SSTTAANNDDAARRDDSS The _t_t_y function is expected to be POSIX 1003.2 compatible. Printed 7/27/90 1Q 1