1 .TH SCAN %manext1% "November 6, 2012" "%nmhversion%"
6 scan \- produce a one line per message scan listing
13 .RB [ \-clear " | " \-noclear ]
18 .RB [ \-header " | " \-noheader ]
21 .RB [ \-reverse " | " \-noreverse ]
29 produces a one\-line\-per\-message listing of the specified
30 folder or messages. Each
32 line contains the message number
33 (name), the date, the \*(lqFrom:\*(rq field, the \*(lqSubject\*(rq field,
34 and, if room allows, some of the body of the message. For example:
38 .ta \w'15+- 'u +\w'07/\|05x 'u +\w'Dcrocker 'u
39 15+ 10/\|05 crocker nned\0\0<<Last week I asked some of
40 16\- 10/\|05 crocker message id format\0\0<<I recommend
41 18 10/\|06 brien Re: Exit status from mkdir
42 19 10/\|07*brien \*(lqscan\*(rq listing format in nmh
46 The `+' on message 15 indicates that it is the current message.
48 The `\-' on message 16 indicates that it has been replied to, as indicated
49 by a \*(lqReplied:\*(rq component (produced by the
56 The `*' on message 19 indicates that no \*(lqDate:\*(rq header was
57 present. The time of last modification of the message is given instead.
59 If there is sufficient room left on the
62 subject, the line will be filled with text from the body, preceded by
63 \*(lq<<\*(rq, and terminated by \*(lq>>\*(rq if the body is sufficiently short.
65 actually reads each of the specified messages and parses them to extract
66 the desired fields. During parsing, appropriate error messages will be
67 produced if there are format errors in any of the messages.
71 will decode RFC 2047 (MIME) encoding in
74 will only decode these fields if your
75 terminal can natively display the character set used in the encoding.
76 You should set the appropriate
78 environment variables to your native
79 character set, if it is not US-ASCII. See
81 for more details on the appropriate environment variables.
87 list the messages in reverse
93 switch allows the user to obtain a
95 listing of a maildrop file as produced by
98 includes every message in the file (you can't scan individual messages).
101 is ignored with this option.
106 may be used to specify the width of
107 the scan line. The default is to use the width of the terminal.
111 switch produces a header line prior to the
113 listing. Currently, the name of the folder and the current date and
114 time are output (see the
116 section for more information).
125 will consult the environment variables
129 to determine your terminal type in order
130 to find out how to clear the screen prior to exiting. If the
134 output is not directed to a terminal
135 (e.g., a pipe or a file), then
137 will send a formfeed prior
140 For example, the command:
143 (scan \-clear \-header; show all \-show pr \-f) | lpr
146 produces a scan listing of the current folder, followed by a formfeed,
147 followed by a formatted listing of all messages in the folder, one
149 .RB \*(lq "\-show\ pr\ \-f" \*(rq
150 will cause the messages to be
151 concatenated, separated by a one\-line header and two blank lines.
153 To override the output format used by
161 switches are used. This permits individual fields of
162 the scan listing to be extracted with ease. The string is simply a format
163 string and the file is simply a format file. See
167 In addition to the standard
171 also recognizes the following additional
177 .ta \w'Dtimenow 'u +\w'Returns 'u
178 .I "Escape Returns Description"
179 body string the (compressed) first part of the body
180 dtimenow date the current date
181 folder string the name of the current folder
185 If no date header is present in the message, the
190 will return values for the date of last
191 modification of the message file itself. This feature is handy for
192 scanning a draft folder, as message drafts usually aren't allowed
193 to have dates in them.
197 directory contains several format files as examples of customized
204 context prior to starting the listing,
205 so interrupting a long
207 listing preserves the new context.
209 purists hate this idea.
213 .ta \w'%etcdir%/ExtraBigFileName 'u
214 ^$HOME/\&.mh\(ruprofile~^The user profile
216 .SH "PROFILE COMPONENTS"
220 .ta \w'ExtraBigProfileName 'u
221 ^Path:~^To determine the user's nmh directory
222 ^Alternate\-Mailboxes:~^To determine the user's mailboxes
223 ^Current\-Folder:~^To find the default current folder
231 .RB ` +folder "' defaults to the current folder"
232 .RB ` msgs "' defaults to all"
233 .RB ` \-format "' defaulted as described above"
235 .RB ` \-width "' defaulted to the width of the terminal"
238 If a folder is given, it will become the current folder.
240 Prior to using the format string mechanism,
243 a heading saying what each column in the listing was. Format strings
244 prevent this from happening.
251 contents of the first message header
254 corresponding component name; any following headers with the same
255 component name are ignored.