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

📄 mailx.html

📁 unix 下的C开发手册,还用详细的例程。
💻 HTML
📖 第 1 页 / 共 5 页
字号:
empty line</i><b>]<br>[</b><i>line beginning with </i>From&lt;space&gt;...<b>]</b></dl></p>where each message begins with the<b>From</b> &lt;space&gt;line shown, preceded by the beginning of the file or an empty line.(The<b>From</b> &lt;space&gt;line is considered to be part of the message header,but not one of the header-lines referred to in<xref href=mxcmds><a href="#tag_001_014_1358_003">Commands in mailx</a></xref>;thus, it is not affected by the<b>discard</b>,<b>ignore</b>or<b>retain</b>commands.)The formats of the remainder of the<b>From</b> &lt;space&gt;line and any additional header lines are unspecified,except that none will be empty.The format of a message body line is also unspecified,except that no line following an empty line can start with<b>From</b> &lt;space&gt;;<i>mailx</i>will modify any such user-entered message body lines(following an empty line and beginning with<b>From</b> &lt;space&gt;)by adding one or more characters to precede theF;it may add these characters to<b>From</b> &lt;space&gt;lines that are not preceded by an empty line.<p>When a message from the system mailbox or entered by theuser is not a text file, it is implementation-dependent howsuch a message is stored in files written by<i>mailx</i>.</blockquote><h4><a name = "tag_001_014_1358">&nbsp;</a>EXTENDED DESCRIPTION</h4><blockquote>The<i>mailx</i>utility cannot guarantee support for all character encodingsin all circumstances.For example,inter-system mail may be restricted to 7-bit data by the underlyingnetwork, 8-bit data need not be portable to non-internationalisedsystems, and so on.Under these circumstances, it is recommended thatonly characters defined in theISO/IEC&nbsp;646:1991 standard International Reference Version(equivalent to ASCII) 7-bit range ofcharacters be used.<p>When<i>mailx</i>is invoked using one of the Receive Mode synopsis forms,it will writethe page of header-summary lines (see below) containing the first newmessage (if<b>-N</b>is not specified),or the first unread message if there are no new messages, orthe first message if there are no new or unread messages,followed by a prompt indicating<i>mailx</i>can accept regular commands(see<xref href=mxcmds><a href="#tag_001_014_1358_003">Commands in mailx</a></xref>);this is termed<i>command mode</i>.When<i>mailx</i>is invoked using the Send Mode synopsisand standard input is a terminal,if no subject is specified on the command line and the<b>asksub</b>variable is set,a prompt for the subject will be written.At this point<i>mailx</i>is in<i>input mode</i>.This input mode is also entered when using one of the Receive Modesynopsis forms and a reply or new message is composed using the<b>reply</b>,<b>Reply</b>,<b>followup</b>,<b>Followup</b>or<b>mail</b>commands.When the message is typed and the end of message is encountered, themessage will be passed to the mail delivery software.Commands can be entered by beginning a line with theescape character (by default, tilde(^))followed by a single command letter and optional arguments.See<xref href=mxcmdesc><a href="#tag_001_014_1358_049">Command Escapes in mailx</a></xref>for a summary of these commands.<dl><dt><b>Note:</b><dd>For notational convenience, this section usesthe default escape character, tilde, in allreferences and examples.</dl><p>At any time,the behaviour of<i>mailx</i>is governed by a set of environmentaland internal variables.These are flags and valued parameters thatcan be set and cleared via the<i>mailx</i><b>set</b>and<b>unset</b>commands.<p>Regular commands are of the form:<p><code><b>[</b><i>command</i><b>]</b><b>[</b><i>msglist</i><b>]</b><b>[</b><i>argument&nbsp;...</i><b>]</b></code><p>If no<i>command</i>is specified in command mode,<b>print</b>is assumed.In input mode,commands are recognised by the escape character,and lines not treated as commands are taken as input for the message.<p>In command mode,each message will be assigned a sequential number,starting with 1.<p>All messages have a state that affects how theyare displayed in the header summary and howthey are retained or deleted upon termination of<i>mailx</i>.There is at any time the notion of a<i>current</i>message, marked by a"&gt;"at the beginning of a line in the header summary.All messages are in one of the following states:<dl compact><dt><i>new</i><dd>The message is present in the system mailbox and hasnot been viewed by the user or moved to any other state.Messages in state<i>new</i>when<i>mailx</i>quits will be retained in the system mailbox.<dt><i>unread</i><dd>The message has been present in the system mailbox for morethan one invocation of<i>mailx</i>and has not been viewed by the user or moved to any other state.Messages in state<i>unread</i>when<i>mailx</i>quits will be retained in the system mailbox.<dt><i>read</i><dd>The message has been processed by one of the following commands:<b>~f</b>,<b>~m</b>,<b>~F</b>,<b>~M</b>,<b>copy</b>,<b>mbox</b>,<b>next</b>,<b>pipe</b>,<b>print</b>,<b>Print</b>,<b>top</b>,<b>type</b>,<b>Type</b>,<b>undelete</b>.The<b>delete</b>,<b>dp</b>and<b>dt</b>commands may also cause the next message to be marked as<i>read</i>,depending on the value of the<b>autoprint</b>variable.Messages that are in the system mailbox and in state<i>read</i>when<i>mailx</i>quits will be saved in the<b>mbox</b>unless the internal variable<b>hold</b>was set.Messages that are in the<b>mbox</b>or in a secondary mailbox and in state<i>read</i>when<i>mailx</i>quits will be retained in their current location.<dt><i>deleted</i><dd>The message has been processed by one of the following commands:<b>delete</b>,<b>dp</b>,<b>dt</b>.A message processed by<b>save</b>will be in state<i>deleted</i>unless the internal variable<b>keepsave</b>was set.Messages in state<i>deleted</i>when<i>mailx</i>quits will be deleted.<dt><i>preserved</i><dd>The message has been processed by a<b>preserve</b>command.When<i>mailx</i>quits, the message will be retained in its current location.</dl><p>The header-summary line for each message will indicatethe state of the message.<p>Many commands take an optional list of messages(<i>msglist</i>)on which to operate, which defaults to the current message.A<i>msglist</i>is a list of message specifications separated byblank characters,which can include:<dl compact><dt><i>n</i><dd>Message number<i>n</i>.<dt><b>+</b><dd>The next undeleted message, or the next deleted message for the<b>undelete</b>command.<dt><b>-</b><dd>The next previous undeleted message,or the next previous deleted message for the<b>undelete</b>command.<dt><b>.</b><dd>The current message.<dt><b>^</b><dd>The first undeleted message,or the first deleted message for the<b>undelete</b>command.<dt><b>$</b><dd>The last message.<dt><b>*</b><dd>All messages.<dt><i>n</i><b>-</b><i>m</i><dd>An inclusive range of message numbers.<dt><i>address</i><dd>All messages from<i>address</i>;any address as shown in a header summary will be matchable in this form.<dt><b>/</b><i>string</i><dd>All messages with<i>string</i>in the subject line (case ignored).<dt><b>:</b><i>c</i><dd>All messages of type<i>c</i>,where<i>c</i>must be one of:<dl compact><dt><b>d</b><dd>deleted messages<dt><b>n</b><dd>new messages<dt><b>o</b><dd>old messages (any not in state<i>read</i>or<i>new</i>)<dt><b>r</b><dd>read messages<dt><b>u</b><dd>unread messages</dl><p></dl><p>Other commands take an optional message(<i>message</i>)on which to operate,which defaults to the current message.All of the forms allowed for<i>msglist</i>are also allowed for<i>message</i>,but if more than onemessage is specified, only the first will be operated on.<p>Other arguments are usually arbitrary strings whose usagedepends on the command involved.<h5><a name = "tag_001_014_1358_001">&nbsp;</a>Start-up in mailx</h5>At start-up time,<i>mailx</i>will take the following steps in sequence:<ol><p><li>Establish all variables at their stated default values.<p><li>Process command-line options,overriding corresponding default values.<p><li>Import any of the<i>DEAD ,</i><i>EDITOR ,</i><i>MBOX ,</i><i>LISTER ,</i><i>PAGER ,</i><i>SHELL</i>or<i>VISUAL</i>variables that are present in the environment,overriding the corresponding default values.<p><li>Read<i>mailx</i>commands from an unspecified system start-up file, unless the<b>-n</b>option is given,to initialise any internal<i>mailx</i>variables and aliases.<p><li>Process the start-up file of<i>mailx</i>commands named in the user<i>MAILRC</i>variable.<p></ol><p>Most regular<i>mailx</i>commands are valid inside start-up files,the most common use being to set up initial display options and alias lists.The following commands are invalid in the start-up file:<b>!</b>,<b>edit</b>,<b>hold</b>,<b>mail</b>,<b>preserve</b>,<b>reply</b>,<b>Reply</b>,<b>shell</b>,<b>visual</b>,<b>Copy</b>,<b>followup</b>and<b>Followup</b>.Any errors in the start-up file will either cause<i>mailx</i>to terminate with a diagnostic message anda non-zero status or to continue after writing a diagnostic message,ignoring the remainder of the lines in the start-up file.<p>A blank line in a start-up file is ignored.<h5><a name = "tag_001_014_1358_002">&nbsp;</a>Internal Variables in mailx</h5><xref type="5" name="mxintv"></xref>The following variables are internal<i>mailx</i>variables.Each internal variablecan be set via the<i>mailx</i><b>set</b>command at any time.The<b>unset</b>and<b>set&nbsp;no</b><i>name</i>commands can be used to erase variables.<p>In the following list, variables shown as:<pre><code>variable</code></pre>represent Boolean values.Variables shown as:<pre><code>variable=<i>value</i></code></pre>will be assigned string or numeric values.For string values, the rules in<xref href=mxcmds><a href="#tag_001_014_1358_003">Commands in mailx</a></xref>concerning filenames and quoting also apply.<p>The defaults specified here may be changed by the implementation-dependentsystem start-up file unless the user specifies the<b>-n</b>option.<dl compact><dt><b>allnet</b><dd>All network names whose login name components match are treated asidentical.This causes the<i>msglist</i>message specifications to behave similarly.The default is<b>noallnet</b>.See also the<b>alternates</b>command and the<b>metoo</b>variable.<dt><b>append</b><dd>Append messages to the end of the<b>mbox</b>file upon termination instead of placing themat the beginning.The default is<b>noappend</b>.This variable will not affect the<b>save</b>command when saving to the<b>mbox</b>.<dt><b>ask</b><dd><dt><b>asksub</b><dd>Prompt for a subject lineon outgoing mail if one is not specified on the command linewith the<b>-s</b>option.The<b>ask</b>and<b>asksub</b>forms are synonyms;the system will refer to<b>asksub</b>and<b>noasksub</b>in its messages, but will accept<b>ask</b>and<b>noask</b>as user input to mean<b>asksub</b>and<b>noasksub</b>.It is not possible to set both<b>ask</b>and<b>noasksub</b>,or<b>noask</b>and<b>asksub</b>.The default is<b>asksub</b>,but no prompting will be done if standard inputis not a terminal.<dt><b>askbcc</b><dd>Prompt for the blind copy list.The default is<b>noaskbcc</b>.<dt><b>askcc</b><dd>Prompt for the copy list.

⌨️ 快捷键说明

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