version 1.8, 2000/03/06 03:16:00 |
version 1.9, 2000/03/11 21:40:06 |
|
|
.Op Fl s |
.Op Fl s |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
The |
The |
.Nm tty |
.Nm |
utility writes the name of the terminal attached to standard input |
utility writes the name of the terminal attached to standard input |
to standard output. |
to standard output. |
The name that is written is the string returned by |
The name that is written is the string returned by |
.Xr ttyname 3 . |
.Xr ttyname 3 . |
If the standard input is not a terminal, the message ``not a tty'' |
.Pp |
|
If the standard input is not a terminal, the message |
|
.Dq not a tty |
is written. |
is written. |
|
.Pp |
The options are as follows: |
The options are as follows: |
.Bl -tag -width Ds |
.Bl -tag -width Ds |
.It Fl s |
.It Fl s |
|
|
command. |
command. |
.El |
.El |
.Pp |
.Pp |
.Nm tty |
The |
exits 0 if the standard input is a terminal, 1 if the standard input is |
.Nm |
not a terminal, or >1 if an error occurred. |
utility exits 0 if the standard input is a terminal, 1 if the standard input |
|
is not a terminal, or >1 if an error occurred. |
.Sh SEE ALSO |
.Sh SEE ALSO |
.Xr stty 1 , |
.Xr stty 1 , |
.Xr test 1 , |
.Xr test 1 , |
|
|
.Xr tty 4 |
.Xr tty 4 |
.Sh STANDARDS |
.Sh STANDARDS |
The |
The |
.Nm tty |
.Nm |
utility conforms to |
utility conforms to |
.St -p1003.2-92 . |
.St -p1003.2-92 . |
.Sh HISTORY |
.Sh HISTORY |