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

149 lines
3.6 KiB
Groff
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
'\"macro stdmacro
.if n .pH g1.write @(#)write 30.2 of 12/25/85
.nr X
.if \nX=0 .ds x} WRITE 1 "Essential Utilities" "\&"
.if \nX=1 .ds x} WRITE 1 "Essential Utilities"
.if \nX=2 .ds x} WRITE 1 "" "\&"
.if \nX=3 .ds x} WRITE "" "" "\&"
.TH \*(x}
.SH NAME
write \- write to another user
.SH SYNOPSIS
.B write
user [ line ]
.SH DESCRIPTION
.I write
copies lines from your terminal to that of another user.
When first called, it sends the message:
.PP
.RS
.B Message from
.I yourname
.BR (tty ?? )
[
.I date
.RB ] \&.\|.\|.
.RE
.PP
to the person you want to talk to. When it has successfully
completed the connection, it also sends two bells to your own
terminal to indicate that what you are typing is being sent.
.PP
The recipient of the message should write back at this point.
Communication continues until an end of file is read from the
terminal, an interrupt is sent, or the recipient has executed
"mesg n". At that point
.I write
writes \f3\s-1EOT\s+1\fP on the other terminal and exits.
.PP
If you want to write to a user who is logged in more than once,
the
.I line
argument may be used to indicate which line or terminal
to send to (e.g.,
.BR tty00 );
otherwise, the first writable instance of
the user found in
.B /var/adm/utmp
is assumed and the
following message posted:
.PP
.RS
.nf
\f2user\fP is logged on more than one place.
You are connected to "\f2terminal\fP\^".
Other locations are:
\f2terminal\fP
.fi
.RE
.PP
Permission to write may be denied or granted by use of the
.IR mesg (1)
command.
Writing to others is normally allowed by default.
Certain commands,
such as
.IR pr (1)
disallow messages in order to prevent
interference with their output. However, if the user has super-user permissions,
messages can be forced onto a write-inhibited terminal.
.PP
If the character \f3!\fP is found at the beginning of a line,
.I write
calls the shell to execute the rest of the line as a command.
.PP
\f4write\f1 processes supplementary code set characters
according to the locale specified in the \f4LC_CTYPE\fP
environment variable [see \f4LANG\fP on \f4environ\fP(5)].
It will detect non-printable characters before sending them to the
user's terminal.
Control characters will appear as a
\f1`\f4^\f1'
followed by the appropriate
ASCII
character; characters with the high-order bit set will appear in
\(lqmeta\(rq notation.
For example,
\f1`\f4\e003\f1'
is displayed as
\f1`\f4^C\f1'
and
\f1`\f4\e372\f1'
as
\f1`\f4M\-z\f1'.
.PP
The following protocol is suggested for using
.IR write :
when you first \f2write\fP to another user, wait for them to
\f2write\fP back before starting to send.
Each person should end a message with a distinctive
signal
(i.e.,
.B (o)
for ``over'') so that the other person knows when to reply.
The signal
.B (oo)
(for ``over and out'') is suggested when conversation
is to be terminated.
.SH FILES
.PD 0
.TP 9
/var/adm/utmp to find user
.TP
/sbin/sh to execute \f3!\fP
.TP
\f4/usr/lib/locale/\f2locale\f4/LC_MESSAGES/uxcore\f1
language-specific message file [See \f4LANG\fP on \f4environ\f1(5).]
.PD
.SH SEE ALSO
mail(1),
mesg(1),
pr(1),
sh(1),
who(1).
.SH DIAGNOSTICS
.TP
\f4UX:write:ERROR:User is not logged on.\f1
if the person you are trying to
\f4write\fP
to is not logged on.
.TP
\f4UX:write:ERROR:Permission denied.\f1
if the person you are trying to
\f4write\fP
to denies that permission (with
\f4mesg\fP).
.TP
\f4UX:write:Warning: cannot respond, set mesg -y.\f1
if your terminal is set to
\f4mesg n\fP
and the recipient cannot respond to you.
.TP
\f4UX:write:ERROR:Can no longer write to user.\f1
if the recipient has denied permission
(\f4mesg n\f1)
after you had started writing.
.\" @(#)write.1 6.3 of 9/2/83
.Ee
'\".so /pubs/tools/origin.att