⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mailx.html

📁 unix 下的C开发手册,还用详细的例程。
💻 HTML
📖 第 1 页 / 共 5 页
字号:
If the<b>toplines</b>variable is set,it is taken as the number of lines to write.The default is 5.<h5><a name = "tag_001_014_1358_039">&nbsp;</a>Touch Messages</h5><i>Synopsis</i>:   tou<b>[</b>ch<b>]</b> <b>[</b><i>msglist</i><b>]</b><p>Touch the specified messages.If any message in<i>msglist</i>is not specifically deleted nor saved in a file,it will be placed in the<b>mbox</b>upon normal termination.See<b>exit</b>and<b>quit</b>.<h5><a name = "tag_001_014_1358_040">&nbsp;</a>Delete Aliases</h5><i>Synopsis</i>:   una<b>[</b>lias<b>]</b> <b>[</b><i>alias</i><b>]</b>...<p>Delete the specified alias names.If a specified alias does not exist, the results are unspecified.<h5><a name = "tag_001_014_1358_041">&nbsp;</a>Undelete Messages</h5><i>Synopsis</i>:   u<b>[</b>ndelete<b>]</b> <b>[</b><i>msglist</i><b>]</b><p>Remove the deleted markings from the specified messages.If<b>autoprint</b>is set, the last message of those restoredwill be written.If<i>msglist</i>is not specified, it defaults to the first deleted messagefollowing the current message that has not been undeleted if there isone, or the last deleted message preceding the current message thathas not been undeleted otherwise.<h5><a name = "tag_001_014_1358_042">&nbsp;</a>Unset Variables</h5><i>Synopsis</i>:   uns<b>[</b>et<b>]</b><i> name</i>...<p>Cause the specified variables to be erased.<h5><a name = "tag_001_014_1358_043">&nbsp;</a>Edit Message with Full-screen Editor</h5><i>Synopsis</i>:   v<b>[</b>isual<b>] [</b><i>msglist</i><b>]</b><p>Edit the given messages with a screen editor.The messages are placed in a temporary file, and theutility named by the<i>VISUAL</i>variablewill be invoked to edit the file.The default editor is<i><a href="vi.html">vi</a></i>.<p>The<b>visual</b>command merely edits the specified messages in a temporary file.It does not modify the contents of those messages in the mailbox.<h5><a name = "tag_001_014_1358_044">&nbsp;</a>Write Messages to a File</h5><i>Synopsis</i>:   w<b>[</b>rite<b>]</b> <b>[</b><i>msglist</i><b>] </b><i>file</i><p><br>Write the given messages to the file specified by the pathname<i>file</i>,minus the message header.Otherwise, it is equivalent to the<b>save</b>command.<h5><a name = "tag_001_014_1358_045">&nbsp;</a>Scroll Header Display</h5><i>Synopsis</i>:   z<b>[</b>+|-<b>]</b><p>Scroll the header display forward (if "+"is specified or if no option isspecified) or backward (if "-" is specified) one screenful.The number of headers written is set by the<b>screen</b>variable.<h5><a name = "tag_001_014_1358_046">&nbsp;</a>Invoke Shell Command</h5><i>Synopsis</i>:   !<i>command</i><p>Invoke the command interpreter specified by<i>SHELL</i>with two arguments:<b>-c</b>and<i>command</i>.(See also<i><a href="sh.html">sh</a></i><b>-c</b>.)If the<b>bang</b>variable is set, each unescaped occurrence of"!"in commandis replaced with the command executed by the previous"!"command or~!command escape.<h5><a name = "tag_001_014_1358_047">&nbsp;</a>Null Command</h5><i>Synopsis</i>:   # <i>comment</i><p>This null command (comment) will be ignored by<i>mailx</i>.<h5><a name = "tag_001_014_1358_048">&nbsp;</a>Display Current Message Number</h5><i>Synopsis</i>:   =<p>Write the current message number.<h5><a name = "tag_001_014_1358_049">&nbsp;</a>Command Escapes in mailx</h5><xref type="5" name="mxcmdesc"></xref>The following commands can be entered only frominput mode,by beginning a line with the escape character(by default, tilde(~)).See the<b>escape</b>variable descriptionfor changing this special character.The format for the commands is:<pre><dl compact><dt> <dd>&lt;ESC&gt;&lt;<i>command-char</i>&gt;&lt;<i>separator</i>&gt;<b>[</b>&lt;<i>arguments</i>&gt;<b>]</b></dl></pre>where the&lt;<i>separator</i>&gt;can be zero or moreblank characters.<p>In the following descriptions, the argument<i>command</i>(but not<i>mailx-command)</i>must be a shell command string.Any string acceptableto the command interpreter specified by the<i>SHELL</i>variablewhen it is invoked as<b>-c</b><i>command_string</i>is valid.The command can be presented as multiple arguments (that is,quoting is not required).<p>Command escapes that are listed with<i>msglist</i>or<i>mailx-command</i>arguments are invalid in Send Modeand produce unspecified results.<dl compact><dt><b>~!</b> <i>command</i><dd>Invoke the command interpreter specified by<i>SHELL</i>with two arguments:<b>-c</b>and<i>command</i>;and then return to input mode.If the<b>bang</b>variable is set, each unescaped occurrence of"!"in<i>command</i>is replaced with the command executed by the previous"!"command or~!command escape.<dt><b>~.</b><dd>Simulate end-of-file (terminate message input).<dt><b>~:</b> <i>mailx-command</i><dd><dt><b>~_ </b><i>mailx-command</i><dd>Perform the command-level request.<dt><b>~?</b><dd>Write a summary of command escapes.<dt><b>~A</b><dd>This is equivalent toi<b>Sign</b>.<dt><b>~a</b><dd>This is equivalent toi<b>sign</b>.<dt><b>~b</b> <i>name...</i><dd>Add the<i>name</i>s to the blind carbon copy (Bcc) list.<dt><b>~c</b> <i>name...</i><dd>Add the<i>name</i>s to the carbon copy (Cc) list.<dt><b>~d</b><dd>Read in the dead-letter file.See<i>DEAD</i>for a description of this file.<dt><b>~e</b><dd>Invoke the editor,as specified by the<i>EDITOR</i>environment variable,on the partial message.<dt><b>~f</b> <b>[</b><i>msglist</i><b>]</b><dd>Forward the specified messages.The specified messages will be inserted into the currentmessage without alteration.This command escape will also insert message headersinto the message with field selection affected by the<b>discard</b>,<b>ignore</b>and<b>retain</b>commands.<dt><b>~F</b> <b>[</b><i>msglist</i><b>]</b><dd>This will be the equivalent of the<b>~f</b>command escape, except that all headerswill be included in the message,regardless of previous<b>discard</b>,<b>ignore</b>and<b>retain</b>commands.<dt><b>~h</b><dd>If standard input is a terminal,prompt for a Subject line and the To, Cc and Bcc lists.Other implementation-dependentheaders may also be presented for editing.If the field is written with an initial value,it can be edited as if it had just been typed.<dt><b>~i</b> <i>string</i><dd>Insert the value of the named variable, followed by anewline character,into the text of the message.If the string is unset or null, the message will not be changed.<dt><b>~m</b> <b>[</b><i>msglist</i><b>]</b><dd>Insert the specified messages into the message,prefixing non-empty lines with the string in the<b>indentprefix</b>variable.This command escape will also insert message headersinto the message, with field selection affected by the<b>discard</b>,<b>ignore</b>and<b>retain</b>commands.<dt><b>~M</b> <b>[</b><i>msglist</i><b>]</b><dd>This will be the equivalent of the<b>~m</b>command escape, except that all headerswill be included in the message,regardless of previous<b>discard</b>,<b>ignore</b>and<b>retain</b>commands.<dt><b>~p</b><dd>Write the message being entered.If the message is longer than<b>crt</b>lines (see<xref href=mxintv><a href="#tag_001_014_1358_002">Internal Variables in mailx</a></xref>),the output will be paginated as described for the<i>PAGER</i>variable.<dt><b>~q</b><dd>Quit (see the<b>quit</b>command) from input mode by simulating an interrupt.If the body of the message is not empty,the partial message will be saved inthe dead-letter file.See<i>DEAD</i>for a description of this file.<dt><b>~r</b> <i>file</i><dd><dt><b>~&lt; </b><i>file</i><dd><dt><b>~&lt; !</b><i>command</i><dd>Read in the file specified by the pathname<i>file</i>.If the argument begins with an exclamation-mark(!),the rest of the string is taken as an arbitrary system command;the command interpreter specified by<i>SHELL</i>will be invoked with two arguments:<b>-c</b>and<i>command</i>.The standard output of<i>command</i>will be inserted into the message.<dt><b>~s</b>&nbsp;<i>string</i><dd>Set the subject line to<i>string</i>.<dt><b>~t</b> <i>name...</i><dd>Add the given<i>name</i>s to the To list.<dt><b>~v</b><dd>Invoke the full-screen editor,as specified by the<i>VISUAL</i>environment variable,on the partial message.<dt><b>~w</b> <i>file</i><dd>Write the partial message,without the header,onto the file named by the pathname<i>file</i>.The file will be created or the message will be appendedto it if the file exists.<dt><b>~x</b><dd>Exit as with<b>~q</b>,except the message will not be saved inthe dead-letter file.<dt><b>~| </b><i>command</i><dd>Pipe the body of the message through the given<i>command</i>by invoking the command interpreter specified by<i>SHELL</i>with two arguments:<b>-c</b>and<i>command</i>.If the<i>command</i>returns a successful exit status,the standard output of the command will replace the message.Otherwise the message will remain unchanged.If the<i>command</i>fails, an error message giving the exit status will be written.</dl></blockquote><h4><a name = "tag_001_014_1359">&nbsp;</a>EXIT STATUS</h4><blockquote>When the<b>-e</b>option is specified, thefollowing exit values are returned:<dl compact><dt>0<dd>Mail was found.<dt>&gt;0<dd>Mail was not found or an error occurred.</dl><p>Otherwise,the following exit values are returned:<dl compact><dt>0<dd>Successful completion;note that this status implies that all messages were<i>sent ,</i>but it gives no assurances that any of them were actually<i>delivered.</i><dt>&gt;0<dd>An error occurred.</dl></blockquote><h4><a name = "tag_001_014_1360">&nbsp;</a>CONSEQUENCES OF ERRORS</h4><blockquote>When in input mode (Receive Mode) or Send Mode:<ul><p><li>If an error is encountered processing a command escape (see<xref href=mxcmdesc><a href="#tag_001_014_1358_049">Command Escapes in mailx</a></xref>),a diagnostic message will be written to standard error,and the message being composed may be modified,but this condition will not prevent themessage from being sent.<p><li>Other errors will prevent the sending of the message.<p></ul><p>When in command mode:<ul><p><li>Default.<p></ul><br></blockquote><h4><a name = "tag_001_014_1361">&nbsp;</a>APPLICATION USAGE</h4><blockquote>Delivery of messages to remote systems requires theexistence of communication paths to such systems.These need not exist.<p>Input lines are limited to{LINE_MAX}bytes, but mailers between systemsmay impose more severe line-length restrictions.This specification does not place any restrictions on the length ofmessages handled by<i>mailx</i>,and for delivery of local messagesthe only limitations should be the normal problems of availabledisk space for the target mail file.When sending messages toexternal machines, applications are advised to limit messages toless than 50 kilobytes because manymail gateways impose message-length restrictions.<p>The format of the system mailbox is intentionally unspecified.Not all systems will implement system mailboxes as flat files,particularly with the advent of multimedia mail messages.Some system mailboxes may be multiple files,others records in a database.The internal format of the messages themselves are specifiedwith the historical format from Version&nbsp;7, but onlyafter they have been saved in some file other than thesystem mailbox.This was done so that many historical applicationsexpecting text-file mailboxes will not be broken.<p>Some new formats for messages can be expected in the future,probably including binary data, bit maps and variousmultimedia objects.As described here,<i>mailx</i>is not prohibited from handling such messages,but it must store them as text files in secondary mailboxes(unless some extension, such as a variableor command-line option, is used to change the stored format).Its method of doing so is implementation-dependent and might includetranslating the data into text-file-compatible or readable form oromitting certain portions of the message from the stored output.<p>The<b>discard</b>and<b>ignore</b>commands are not inverses of the<b>retain</b>command.The<b>retain</b>command discards all header-fields except those explicitly retained.The<b>discard</b>command keeps all header-fields except thoseexplicitly discarded.If headers exist on the retained header list,<b>discard</b>and<b>ignore</b>commands are ignored.</blockquote><h4><a name = "tag_001_014_1362">&nbsp;</a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_1363">&nbsp;</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_1364">&nbsp;</a>SEE ALSO</h4><blockquote><i><a href="ed.html">ed</a></i>,<i><a href="ls.html">ls</a></i>,<i><a href="mail.html">mail</a></i>,<i><a href="more.html">more</a></i>,<i><a href="vi.html">vi</a></i>.<br></blockquote><hr size=2 noshade><center><font size=2>UNIX &reg; is a registered Trademark of The Open Group.<br>Copyright &copy; 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>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -