home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / unix / riscbsd / 1_1_contri / usd / 08_mh / scan_me < prev    next >
Encoding:
Text File  |  1986-04-15  |  4.5 KB  |  133 lines

  1. .\"    This file is automatically generated.  Do not edit!
  2. .SC SCAN 1
  3. .NA
  4. scan \- produce a one line per message scan listing
  5. .SY
  6. scan
  7. \%[+folder] \%[msgs]
  8. \%[\-clear] \%[\-noclear]
  9. \%[\-form\ formatfile]
  10. \%[\-format\ string]
  11. \%[\-header] \%[\-noheader]
  12. \%[\-width\ columns]
  13. \%[\-help]
  14. .DE
  15. \fIScan\fR produces a one\-line\-per\-message listing of the specified
  16. messages.
  17. Each \fIscan\fR line contains the message number (name),
  18. the date, the \*(lqFrom:\*(rq field, the \*(lqSubject\*(rq field, and, if room
  19. allows, some of the body of the message.
  20. For example:
  21.  
  22. .nf
  23. .in +.5i
  24. .ta \w'15+- 'u +\w'7/\05  'u +\w'Dcrocker  'u
  25. 15+    7/\05    Dcrocker    nned\0\0\*(<<Last week I asked some of
  26. 16\0-    7/\05    dcrocker    message id format\0\0\*(<<I recommend
  27. 18    7/\06    Obrien    Re: Exit status from mkdir
  28. 19    7/\07    Obrien    \*(lqscan\*(rq listing format in MH
  29. .re
  30. .in -.5i
  31. .fi
  32.  
  33. The `+' on message 15 indicates that it is the current message.
  34. The `\-' on message 16 indicates that it has been
  35. replied to, as indicated by a \*(lqReplied:\*(rq component produced by
  36. an `\-annotate' switch to the \fIrepl\fR command.
  37.  
  38. If there is sufficient room left on the \fIscan\fR line after the
  39. subject, the line will be filled with text from the body,
  40. preceded by <<, and terminated by >> if the body is sufficiently short.
  41. \fIScan\fR actually reads each of the specified
  42. messages and parses them to extract the desired fields.
  43. During parsing, appropriate error messages will be produced if
  44. there are format errors in any of the messages.
  45.  
  46. The `\-header' switch produces a header line prior to the \fIscan\fR
  47. listing.
  48. Currently,
  49. the name of the folder and the current date and time are output
  50. (see the \fBHISTORY\fR section for more information).
  51.  
  52. If the `\-clear' switch is used and \fIscan's\fR output is directed to a
  53. terminal,
  54. then \fIscan\fR will consult the \fB$TERM\fR and \fB$TERMCAP\fR
  55. environment variables to determine your
  56. terminal type in order to find out how to clear the screen prior to exiting.
  57. If the `\-clear' switch is used and \fIscan's\fR output is not directed to
  58. a terminal (e.g., a pipe or a file),
  59. then \fIscan\fR will send a formfeed prior to exiting.
  60.  
  61. For example, the command:
  62.  
  63. .ti +.5i
  64. (scan \-clear \-header; show all \-show pr \-f) | lpr
  65.  
  66. produces a scan listing of the current folder, followed by a formfeed,
  67. followed by a formatted listing of all messages in the folder, one per
  68. page.  Omitting `\-show\ pr\ \-f' will cause the messages to be concatenated,
  69. separated by a one\-line header and two blank lines.
  70.  
  71. If \fIscan\fR encounters a message without a \*(lqDate:\*(rq field,
  72. rather than leaving that portion of the scan listing blank,
  73. the date is filled\-in with the last write date of the message,
  74. and post\-fixed with a `*'.
  75. This is particularly handy for scanning a \fIdraft folder\fR,
  76. as message drafts usually aren't allowed to have dates in them.
  77.  
  78. To override the output format used by \fIscan\fR,
  79. the `\-format\ string' or `\-format\ file' switches are used.
  80. This permits individual fields of the scan listing to be extracted with ease.
  81. The string is simply a format string and the file is simply a format file.
  82. See \fImh\-format\fR\0(5) for the details.
  83.  
  84. In addition to the standard escapes,
  85. \fIscan\fR also recognizes the following additional escape:
  86. .nf
  87. .ta \w'escape  'u
  88. \fIescape\fR    \fIsubstitution\fR
  89. body    the (compressed) first part of the body
  90. .re
  91. .fi
  92.  
  93. On hosts where \fIMH\fR was configured with the BERK option,
  94. \fIscan\fR has two other switches: `\-reverse', and `\-noreverse'.
  95. These make \fIscan\fR list the messages in reverse order.
  96. In addition,
  97. \fIscan\fR will update the \fIMH\fR context prior to starting the listing,
  98. so interrupting a long \fIscan\fR listing preserves the new context.
  99. \fIMH\fR purists hate both of these ideas.
  100. .Fi
  101. ^$HOME/\&.mh\(ruprofile~^The user profile
  102. .Pr
  103. ^Path:~^To determine the user's MH directory
  104. .Ps
  105. ^Alternate\-Mailboxes:~^To determine the user's mailboxes
  106. .Ps
  107. ^Current\-Folder:~^To find the default current folder
  108. .Sa
  109. inc(1), pick(1), show(1), mh\-format(5)
  110. .De
  111. `+folder' defaults to the folder current
  112. .Ds
  113. `msgs' defaults to all
  114. .Ds
  115. `\-format' defaulted as described above
  116. .Ds
  117. `\-noheader'
  118. .Ds
  119. `\-width' defaulted to the width of the terminal
  120. .Co
  121. If a folder is given, it will become the current folder.
  122. .Hi
  123. Prior to using the format string mechanism,
  124. `\-header' used to generate a heading saying what each column in the listing
  125. was.
  126. Format strings prevent this from happening.
  127. .Bu
  128. The argument to the `\-format' switch must be interpreted as a single token
  129. by the shell that invokes \fIscan\fR.
  130. Therefore,
  131. one must usually place the argument to this switch inside double\-quotes.
  132. .En
  133.