SCAN(1) | [nmh-1.5] | SCAN(1) |
NAME¶
scan - produce a one line per message scan listingSYNOPSIS¶
scan
[+folder] [msgs] [-clear | -noclear] [-form
formatfile] [-format string] [-header |
-noheader] [-width columns] [-reverse |
-noreverse] [-file filename] [-version]
[-help]
DESCRIPTION¶
Scan produces a one-line-per-message listing of the specified folder or messages. Each scan line contains the message number (name), the date, the “From:” field, the “Subject” field, and, if room allows, some of the body of the message. For example:15+ 10/05 crocker nned <<Last week I asked some of 16- 10/05 crocker message id format <<I recommend 18 10/06 brien Re: Exit status from mkdir 19 10/07*brien “scan” listing format in nmh
(scan -clear -header; show all -show pr -f) |
lpr
produces a scan listing of the current folder, followed by a formfeed, followed
by a formatted listing of all messages in the folder, one per page. Omitting
“-show pr -f” will cause the messages to be
concatenated, separated by a one-line header and two blank lines.
To override the output format used by scan, the -format
string or -form file switches are used. This permits
individual fields of the scan listing to be extracted with ease. The string is
simply a format string and the file is simply a format file. See
mh-format(5) for the details.
In addition to the standard mh-format(5) escapes, scan also
recognizes the following additional component escapes:
Escape Returns Description body string the (compressed) first part of the body dtimenow date the current date folder string the name of the current folder
FILES¶
^$HOME/.mhprofile~^The user profile
PROFILE COMPONENTS¶
^Path:~^To determine the user's nmh directory ^Alternate-Mailboxes:~^To determine the user's mailboxes ^Current-Folder:~^To find the default current folder
SEE ALSO¶
inc(1), pick(1), show(1), mh-format(5)DEFAULTS¶
`+folder' defaults to the current folder `msgs' defaults to all `-format' defaulted as described above `-noheader' `-width' defaulted to the width of the terminal
CONTEXT¶
If a folder is given, it will become the current folder.HISTORY¶
Prior to using the format string mechanism, -header used to generate a heading saying what each column in the listing was. Format strings prevent this from happening.BUGS¶
The argument to the -format switch must be interpreted as a single token by the shell that invokes scan. Therefore, one must usually place the argument to this switch inside quotes. The value of each component escape is set by scan to the contents of the first message header scan encounters with the corresponding component name; any following headers with the same component name are ignored.11 June 2012 | MH.6.8 |