1
0
Files
irix-657m-src/eoe/man/man1/tty.1
2022-09-29 17:59:04 +03:00

55 lines
1.0 KiB
Groff

'\"! tbl | mmdoc
'\"macro stdmacro
.if n .pH g1.tty @(#)tty 30.2 of 12/25/85
.nr X
.if \nX=0 .ds x} TTY 1 "User Environment Utilities" "\&"
.if \nX=1 .ds x} TTY 1 "User Environment Utilities"
.if \nX=2 .ds x} TTY 1 "" "\&"
.if \nX=3 .ds x} TTY "" "" "\&"
.TH \*(x}
.SH NAME
tty \- get the name of the terminal
.SH SYNOPSIS
.B tty
[
.B \-l
]
[
.B \-s
]
.SH DESCRIPTION
.I tty\^
prints the path name of the user's terminal.
.TP
.B \-l
prints the synchronous line number to which the user's terminal is
connected,
if it is on an active synchronous line.
.TP
.B \-s
inhibits printing of the terminal path name,
allowing one to test just the exit code.
.PP
.TS
center;
c s
l l.
EXIT CODES
2 if invalid options were specified,
0 if standard input is a terminal,
1 otherwise.
.TE
.SH DIAGNOSTICS
``not on an active synchronous line'' if the standard input is not a
synchronous terminal and
.B \-l
is specified.
.br
``not a tty'' if the standard input is not a terminal
and
.B \-s
is not specified.
.\" @(#)tty.1 6.2 of 9/2/83
.Ee
'\".so /pubs/tools/origin.att