Command Syntax

The format of a MAIL8 command has four parts:

These must appear on the command line in the order listed. You may often omit one or more of the parts, as described below.

Message References

Message references indicate one or more messages to which a command should apply. All of these messages are taken to be in the same drawer. The options of the command or the command itself determine which drawer is used. A message reference specifies either a single message or a message range. See "expl mail reference" for further information.

Single references or message ranges may be specified for the following commands.

          Delete     MODify     Print
          ReMail     Summary    UnRead

The following commands may have single references but not message ranges.

          Follow_up  Reply      Reply_Delete

If you do not supply a message reference for a command that normally takes a reference, MAIL8 uses the current message in the appropriate drawer.

Command Names

Command names are simple words like Print or Delete. Some names have underbars in them (e.g. Follow_up). Command names may follow the message references immediately or be separated from the messages by one or more intervening spaces or tabs. Thus you can say either

          3 print
          3print

You will notice that MAIL8 documentation always shows command names with some letters in uppercase and some in lowercase. This is a convention related to abbreviation. When you are entering a MAIL8 command, underbars and any or all of the letters shown in lowercase may be omitted in the interest of abbreviation. For example, the following are valid abbreviations of the UnRead command:

          unread
          uread
          unr
          ur

Note that this use of upper and lowercase is just a documentation convention -- you may enter commands in uppercase, lowercase, or mixtures of the two.

Command Arguments

Command arguments provide information for the command. For example, the To command sends a message to someone; the address of the intended recipient is specified as an argument for the To command. The arguments accepted by each command are given in the individual command descriptions.

Arguments for a command are separated from the command name and from other arguments or options by one or more spaces or tabs.

Options

Options specify additional information for a command. Options are separated from arguments and other options by one or more spaces or tabs.

Options come in three forms:

          +Keyword
          -Keyword
           Keyword=value

In general, +Keyword turns an option on, -Keyword turns an option off, and Keyword=value specifies some value for an option setting. Here are some examples of command lines that make use of options.

          3 print +unread

displays message 3 in the Unread drawer. Similarly,

          4,6 print +outbound

displays message 4 through 6 in the Outbound drawer.

          $ modify -registered

removes the Registered characteristic from the last message in the Outbound drawer.

          to mmuffet subject="Your tuffet"

specifies a Subject information line for a message to userid mmuffet. Note the double quotes around "Your tuffet". When the value of a Keyword=value has spaces or tabs in it, you must enclose the value in double quotes (") or single quotes ('). If the value doesn't contain spaces or tabs, you don't need the quote marks (although you can still add them if you wish).

Option keywords may be abbreviated in the same way as command names. For example, an option like +Unread may abbreviated as far as +u if you wish.

Redirection Options

You may add redirection options to many commands. Input redirection options obtain material from a file; output redirection options write something to a file.

An input redirection option has the form

          <filename

When a command contains such an option, MAIL8 uses the contents of the given file as input for that command. For example,

          to hdumpty <egghead

sends the contents of the file egghead to userid hdumpty.

There are two output redirection options. If a command line contains

          >filename

output that MAIL8 normally displays on the terminal screen is written into the given file instead. For example,

          print +unread >myfile

writes the contents of an Unread message into a file named "myfile" instead of displaying the message on the terminal screen. If the specified file doesn't already exist, MAIL8 creates it. If the file name has a slash "/" character in it, the name refers to a permanent file; otherwise, it refers to a temporary file. The output overwrites anything that was previously in myfile.

The other output redirection option has the form

          >>filename

This is much like >filename, except that MAIL8's output is appended to the end of the current contents of the given file, instead of overwriting those contents.

Input and output redirection options may be added to all commands. However, they are only useful in a few commands. Input redirection is useful for

          Follow_up    Reply    Reply_Delete    To

Output redirection is useful for

          CONFiguration  Help     Option    Print
          STATus         Summary

Multiple Commands on a Line

MAIL8 lets you specify more than one command on a line. Commands are separated by semicolons, as in

          mail $d ; p +u

As shown above, a semicolon may be surrounded by white space, but it does not have to be. Multiple commands can be used on the main MAIL8 command line, or in response to the usual Mail? response inside a MAIL8 session.

If you use multiple commands on the command line that invokes MAIL8, you automatically go into interactive mode after the commands have been executed. For example, if you are at command level (build mode) and type

          mail *s +u ; #p +u

MAIL8 summarizes all your unread messages, displays the first one, then goes interactive by prompting you with

          Mail?

If you do not want to begin an interactive session, you can add a Quit command, as in

          mail *s +u; #p +u; q

telling MAIL8 to quit executing the other commands on the command line.

When a MAIL8 command line contains a TSS command (indicated by the "!" character), the rest of the line is considered part of the TSS command, whether or not it contains semicolons. For example, in

          p +u ; !echo This is ; all one command

the TSS command is considered to be

          !echo This is ; all one command

Conventions

In the descriptions of the syntax of MAIL8 commands, items placed in square brackets are optional. For example, you might see

          To [user] [options]

This means the command accepts zero or more userids and options, separated by blanks as in

          To user user user option option

Copyright © 1997, Thinkage Ltd.