?? write.html
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>write</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_001_014_2904"> </a>NAME</h4><blockquote>write - write to another user</blockquote><h4><a name = "tag_001_014_2905"> </a>SYNOPSIS</h4><blockquote><pre><code>write <i>user_name </i><b>[</b><i>terminal</i><b>]</b></code></pre></blockquote><h4><a name = "tag_001_014_2906"> </a>DESCRIPTION</h4><blockquote>The<i>write</i>utility reads lines from the user's standard input andwrites them to the terminal of another user.When first invoked, it writes the message:<pre><code><b>Message from </b><i>sender-login-id</i> (<i>sending-terminal</i>) <b>[</b><i>date</i><b>]</b>...</code></pre>to<i>user_name</i>.When it has successfullycompleted the connection,the sender's terminal will be alerted twiceto indicate that what the sender is typingis being written to the recipient's terminal.<p>If the recipient wants to reply, this can be accomplished by typing:<pre><code>write <i>sender-login-id </i><b>[</b><i>sending-terminal</i><b>]</b></code></pre>upon receipt of the initial message.Whenever a line of input as delimited by a NL, EOF or EOL specialcharacter (seethe <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b> </a> )is accumulatedwhile in canonical input mode, the accumulated datawill be written on the other user's terminal.Characters are processed as follows:<ul><p><li>Typing thealertcharacter will write thealertcharacter to the recipient's terminal.<p><li>Typing the erase and killcharacters will affect the sender's terminalin the manner described by the<b>termios</b>interface inthe <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b> </a> .<p><li>Typing the interrupt or end-of-file characters will cause<i>write</i>to write an appropriate message(EOT\nin the POSIX locale)to the recipient's terminal and exit.<p><li>Typing characters from LC_CTYPE classifications<b>print</b>or<b>space</b>will cause those characters to be sent to the recipient's terminal.<p><li>When and only when the<i><a href="stty.html">stty</a></i><i>iexten</i>local modeis enabled,the existence and processing ofadditional special controlcharacters andmulti-byte or single-byte functions is implementation-dependent.<p><li>Typing other non-printable characterswill cause implementation-dependent sequences ofprintable characters to be written to the recipient's terminal.<p></ul><p>To write to a user who is logged in more than once,the<i>terminal</i>argument can be used to indicate which terminalto write to;otherwise, the recipient's terminalis selected in an implementation-dependent manner andan informational message will be writtento the sender's standard output,indicating which terminal was chosen.<p>Permission to be a recipient of a<i>write</i>message can be denied or granted by use of the<i><a href="mesg.html">mesg</a></i>utility.However, a user's privilege may further constrainthe domain of accessibility of other users' terminals.The<i>write</i>utility will fail when the user lacks the appropriate privilegesto perform the requested action.</blockquote><h4><a name = "tag_001_014_2907"> </a>OPTIONS</h4><blockquote>None.<br></blockquote><h4><a name = "tag_001_014_2908"> </a>OPERANDS</h4><blockquote>The following operands are supported:<dl compact><dt><i>user_name</i><dd>Login name of the person to whom the message will be written.This operand must be of the form returned by the<i><a href="who.html">who</a></i>utility.<dt><i>terminal</i><dd>Terminal identification in the same format provided by the<i><a href="who.html">who</a></i>utility.</dl></blockquote><h4><a name = "tag_001_014_2909"> </a>STDIN</h4><blockquote>Lines to be copied to the recipient'sterminal will be read from standard input.</blockquote><h4><a name = "tag_001_014_2910"> </a>INPUT FILES</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_2911"> </a>ENVIRONMENT VARIABLES</h4><blockquote>The following environment variables affect the execution of<i>write</i>:<dl compact><dt><i>LANG</i><dd>Provide a default value for the internationalisation variablesthat are unset or null.If<i>LANG</i>is unset or null, the corresponding value from theimplementation-dependent default locale will be used.If any of the internationalisation variables contains an invalid setting, theutility will behave as if none of the variables had been defined.<dt><i>LC_ALL</i><dd>If set to a non-empty string value,override the values of all the other internationalisation variables.<dt><i>LC_CTYPE</i><dd>Determine thelocale for the interpretation of sequences of bytes of text data ascharacters (for example, single- as opposed to multi-byte charactersin arguments and input files).If the recipient's locale does not use an LC_CTYPE equivalent to thesender's, the results are undefined.<dt><i>LC_MESSAGES</i><dd>Determine the locale that should be used to affectthe format and contents of diagnosticmessages written to standard errorand informative messages written to standard output.<dt><i>NLSPATH</i><dd>Determine the location of message cataloguesfor the processing of<i>LC_MESSAGES .</i></dl></blockquote><h4><a name = "tag_001_014_2912"> </a>ASYNCHRONOUS EVENTS</h4><blockquote>If an interrupt signal is received,<i>write</i>will write an appropriate message on the recipient'sterminal and exit with a status of zero.It will take the standard action for all other signals.</blockquote><h4><a name = "tag_001_014_2913"> </a>STDOUT</h4><blockquote>An informational message will be written to standard outputif a recipient is logged in more than once.</blockquote><h4><a name = "tag_001_014_2914"> </a>STDERR</h4><blockquote>Used only for diagnostic messages.</blockquote><h4><a name = "tag_001_014_2915"> </a>OUTPUT FILES</h4><blockquote>The recipient's terminal will be used for output.</blockquote><h4><a name = "tag_001_014_2916"> </a>EXTENDED DESCRIPTION</h4><blockquote>None.<br></blockquote><h4><a name = "tag_001_014_2917"> </a>EXIT STATUS</h4><blockquote>The following exit values are returned:<dt>0<dd>Successful completion.<dt>>0<dd>The addressed user is not logged on orthe addressed user denies permission.</dl></blockquote><h4><a name = "tag_001_014_2918"> </a>CONSEQUENCES OF ERRORS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_2919"> </a>APPLICATION USAGE</h4><blockquote>The<i><a href="talk.html">talk</a></i>utility is considered by some users to be a moreusable utility on full-screen terminals.</blockquote><h4><a name = "tag_001_014_2920"> </a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_2921"> </a>FUTURE DIRECTIONS</h4><blockquote>The IEEE PASC 1003.2 Interpretations Committee has forwarded concerns aboutparts of this interface definition to the IEEE PASC Shell and Utilities Working Groupwhich is identifying the corrections.A future revision of this specification will align withIEEE Std. 1003.2b when finalised.</blockquote><h4><a name = "tag_001_014_2922"> </a>SEE ALSO</h4><blockquote><i><a href="mesg.html">mesg</a></i>,<i><a href="talk.html">talk</a></i>,<i><a href="who.html">who</a></i>,the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b> </a> .</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -