logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

write.1p (7523B)


  1. '\" et
  2. .TH WRITE "1P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. write
  12. \(em write to another user
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. write \fIuser_name \fB[\fIterminal\fB]\fR
  17. .fi
  18. .SH DESCRIPTION
  19. The
  20. .IR write
  21. utility shall read lines from the standard input and write them
  22. to the terminal of the specified user. When first invoked, it shall
  23. write the message:
  24. .sp
  25. .RS 4
  26. .nf
  27. \fBMessage from \fIsender-login-id\fR (\fIsending-terminal\fR) \fB[\fIdate\fB]\fR...
  28. .fi
  29. .P
  30. .RE
  31. .P
  32. to
  33. .IR user_name .
  34. When it has successfully completed the connection, the sender's
  35. terminal shall be alerted twice to indicate that what the sender is
  36. typing is being written to the recipient's terminal.
  37. .P
  38. If the recipient wants to reply, this can be accomplished by typing:
  39. .sp
  40. .RS 4
  41. .nf
  42. write \fIsender-login-id \fB[\fIsending-terminal\fB]\fR
  43. .fi
  44. .P
  45. .RE
  46. .P
  47. upon receipt of the initial message. Whenever a line of input as
  48. delimited by an NL, EOF, or EOL special character (see the Base Definitions volume of POSIX.1\(hy2017,
  49. .IR "Chapter 11" ", " "General Terminal Interface")
  50. is accumulated while in canonical input mode, the accumulated data shall
  51. be written on the other user's terminal. Characters shall be processed
  52. as follows:
  53. .IP " *" 4
  54. Typing
  55. <alert>
  56. shall write the
  57. <alert>
  58. character to the recipient's terminal.
  59. .IP " *" 4
  60. Typing the erase and kill characters shall affect the sender's terminal
  61. in the manner described by the
  62. .BR termios
  63. interface in the Base Definitions volume of POSIX.1\(hy2017,
  64. .IR "Chapter 11" ", " "General Terminal Interface".
  65. .IP " *" 4
  66. Typing the interrupt or end-of-file characters shall cause
  67. .IR write
  68. to write an appropriate message (\c
  69. .BR \(dqEOT\en\(dq
  70. in the POSIX locale) to the recipient's terminal and exit.
  71. .IP " *" 4
  72. Typing characters from
  73. .IR LC_CTYPE
  74. classifications
  75. .BR print
  76. or
  77. .BR space
  78. shall cause those characters to be sent to the recipient's terminal.
  79. .IP " *" 4
  80. When and only when the
  81. .IR stty
  82. .BR iexten
  83. local mode is enabled, the existence and processing of additional
  84. special control characters and multi-byte or single-byte functions is
  85. implementation-defined.
  86. .IP " *" 4
  87. Typing other non-printable characters shall cause
  88. implementation-defined sequences of printable characters to be
  89. written to the recipient's terminal.
  90. .P
  91. To write to a user who is logged in more than once, the
  92. .IR terminal
  93. argument can be used to indicate which terminal to write to; otherwise,
  94. the recipient's terminal is selected in an implementation-defined
  95. manner and an informational message is written to the sender's standard
  96. output, indicating which terminal was chosen.
  97. .P
  98. Permission to be a recipient of a
  99. .IR write
  100. message can be denied or granted by use of the
  101. .IR mesg
  102. utility. However, a user's privilege may further constrain the domain
  103. of accessibility of other users' terminals. The
  104. .IR write
  105. utility shall fail when the user lacks appropriate privileges to
  106. perform the requested action.
  107. .SH OPTIONS
  108. None.
  109. .SH OPERANDS
  110. .br
  111. The following operands shall be supported:
  112. .IP "\fIuser_name\fR" 10
  113. Login name of the person to whom the message shall be written. The
  114. application shall ensure that this operand is of the form returned by
  115. the
  116. .IR who
  117. utility.
  118. .IP "\fIterminal\fR" 10
  119. Terminal identification in the same format provided by the
  120. .IR who
  121. utility.
  122. .SH STDIN
  123. Lines to be copied to the recipient's terminal are read from standard
  124. input.
  125. .SH "INPUT FILES"
  126. None.
  127. .SH "ENVIRONMENT VARIABLES"
  128. The following environment variables shall affect the execution of
  129. .IR write :
  130. .IP "\fILANG\fP" 10
  131. Provide a default value for the internationalization variables that are
  132. unset or null. (See the Base Definitions volume of POSIX.1\(hy2017,
  133. .IR "Section 8.2" ", " "Internationalization Variables"
  134. for the precedence of internationalization variables used to determine
  135. the values of locale categories.)
  136. .IP "\fILC_ALL\fP" 10
  137. If set to a non-empty string value, override the values of all the
  138. other internationalization variables.
  139. .IP "\fILC_CTYPE\fP" 10
  140. Determine the locale for the interpretation of sequences of bytes of
  141. text data as characters (for example, single-byte as opposed to
  142. multi-byte characters in arguments and input files). If the
  143. recipient's locale does not use an
  144. .IR LC_CTYPE
  145. equivalent to the sender's, the results are undefined.
  146. .IP "\fILC_MESSAGES\fP" 10
  147. .br
  148. Determine the locale that should be used to affect the format and
  149. contents of diagnostic messages written to standard error and
  150. informative messages written to standard output.
  151. .IP "\fINLSPATH\fP" 10
  152. Determine the location of message catalogs for the processing of
  153. .IR LC_MESSAGES .
  154. .SH "ASYNCHRONOUS EVENTS"
  155. If an interrupt signal is received,
  156. .IR write
  157. shall write an appropriate message on the recipient's terminal and
  158. exit with a status of zero. It shall take the standard action for all
  159. other signals.
  160. .SH STDOUT
  161. An informational message shall be written to standard output if a
  162. recipient is logged in more than once.
  163. .SH STDERR
  164. The standard error shall be used only for diagnostic messages.
  165. .SH "OUTPUT FILES"
  166. The recipient's terminal is used for output.
  167. .SH "EXTENDED DESCRIPTION"
  168. None.
  169. .SH "EXIT STATUS"
  170. The following exit values shall be returned:
  171. .IP "\00" 6
  172. Successful completion.
  173. .IP >0 6
  174. The addressed user is not logged on or the addressed user denies
  175. permission.
  176. .SH "CONSEQUENCES OF ERRORS"
  177. Default.
  178. .LP
  179. .IR "The following sections are informative."
  180. .SH "APPLICATION USAGE"
  181. The
  182. .IR talk
  183. utility is considered by some users to be a more usable utility on
  184. full-screen terminals.
  185. .SH EXAMPLES
  186. None.
  187. .SH RATIONALE
  188. The
  189. .IR write
  190. utility was included in this volume of POSIX.1\(hy2017 since it can be implemented on all
  191. terminal types. The standard developers considered the
  192. .IR talk
  193. utility, which cannot be implemented on certain terminals, to be a
  194. ``better'' communications interface. Both of these programs are in
  195. widespread use on historical implementations. Therefore, the standard
  196. developers decided that both utilities should be specified.
  197. .P
  198. The format of the terminal name is unspecified, but the descriptions of
  199. .IR ps ,
  200. .IR talk ,
  201. .IR who ,
  202. and
  203. .IR write
  204. require that they all use or accept the same format.
  205. .SH "FUTURE DIRECTIONS"
  206. None.
  207. .SH "SEE ALSO"
  208. .IR "\fImesg\fR\^",
  209. .IR "\fItalk\fR\^",
  210. .IR "\fIwho\fR\^"
  211. .P
  212. The Base Definitions volume of POSIX.1\(hy2017,
  213. .IR "Chapter 8" ", " "Environment Variables",
  214. .IR "Chapter 11" ", " "General Terminal Interface"
  215. .\"
  216. .SH COPYRIGHT
  217. Portions of this text are reprinted and reproduced in electronic form
  218. from IEEE Std 1003.1-2017, Standard for Information Technology
  219. -- Portable Operating System Interface (POSIX), The Open Group Base
  220. Specifications Issue 7, 2018 Edition,
  221. Copyright (C) 2018 by the Institute of
  222. Electrical and Electronics Engineers, Inc and The Open Group.
  223. In the event of any discrepancy between this version and the original IEEE and
  224. The Open Group Standard, the original IEEE and The Open Group Standard
  225. is the referee document. The original Standard can be obtained online at
  226. http://www.opengroup.org/unix/online.html .
  227. .PP
  228. Any typographical or formatting errors that appear
  229. in this page are most likely
  230. to have been introduced during the conversion of the source files to
  231. man page format. To report such errors, see
  232. https://www.kernel.org/doc/man-pages/reporting_bugs.html .