[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 5

scan Command

Purpose

Produces a one line per message scan listing.

Syntax

scan+Folder ] [ Messages ] [ -form FormFile -format String ] [ -noheader -header ] [ -clear -noclear ] [ -help ]

Description

The scan command displays a line of information about the messages in a specified folder. Each line gives the message number, date, sender, subject, and as much of the message body as possible. By default, the scan command displays information about all of the messages in the current folder.

If a + (plus sign) is displayed after the message number, the message is the current message in the folder. If a - (minus sign) is displayed, you have replied to the message. If an * (asterisk) is displayed after the date, the Date: field was not present and the displayed date is the last date the message was changed.

Flags

-clear Clears the display after sending output. The scan command uses the values of the $TERM environment variable to determine how to clear the display. If standard output is not a display, the scan command sends a form feed character after sending the output.
+Folder Specifies which folder to scan. The default is the current folder.
-form FormFile Displays the scan command output in the alternate format described by the FormFile variable.
-format String Displays the scan command output in the alternate format described by the String variable.
-header Displays a heading that lists the folder name and the current date and time.
-help Lists the command syntax, available switches (toggles), and version information.
Note: For Message Handler (MH), the name of this flag must be fully spelled out.
Messages Displays information about each specified message in the specified folder. You can use the following references when specifying messages:
Number Specifies the number of the message.
Sequence Specifies a group of messages specified by the user. Recognized values include:
all All messages in a folder. This is the default.
cur or . (period) Current message.
first First message in a folder.
last Last message in a folder.
next Message following the current message.
prev Message preceding the current message.
-noclear Prevents clearing of the terminal after sending output. This is the default.
-noheader Prevents display of a heading. This is the default.
-width Number Sets the number of columns in the scan command output. The default is the width of the display.

Profile Entries

The following entries are entered in the UserMhDirectory/.mh_profile file:

Alternate-Mailboxes: Specifies the mailboxes.
Current-Folder: Sets the default current folder.
Path: Specifies the UserMhDirectory.

Examples

  1. To get a one-line list of all the messages in the current folder, enter:
    scan
    The system responds with a message similar to the following:
    3   04/17 dale@athena Status meeting <<The weekly status meeting
    5   04/20 tom@venus   Due Dates      <<Your project is due to
    6   04/21 dawn@tech   Writing Clas   <<There will be a writing
  2. To get a one-line list of messages 11 through 15 in the test folder, enter:
    scan +test 11-15 
    The system responds with a message similar to the following:
    11  04/16 karen@anchor Meeting    <<Today's meeting is at 2 p.m.
    12  04/18 tom@venus    Luncheon   <<There will be a luncheon to
    14  04/20 dale@athena  First Draft  <<First drafts are due
    15  04/21 geo@gtwn     Examples   <<The examples will be written

Files

$HOME/.mh_profile Contains the MH user profile.
/etc/mh/scan.size Contains a sample scan format string.
/etc/mh/scan.time Contains a sample scan format string.
/etc/mh/scan.timely Contains a sample scan format string.
/usr/bin/scan Contains the executable form of the scan command.

Related Information

The inc command, pick command, show command.

The mh_alias file format, mh_profile file format.

Mail Overview in AIX Version 4.3 System User's Guide: Communications and Networks.

Peek, Jerry. MH and xmh: E-mail for Users and Programmers. Sebastopol, CA: O'Reilly & Associates, 1992.


[ Previous | Next | Contents | Glossary | Home | Search ]