SORTM(1) BSD Reference Manual SORTM(1)
S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
sortm [+folder] [msgs] [-datefield field]
[-textfield field] [-notextfield] [-limit days]
[-nolimit] [-verbose] [-noverbose] [-help]
D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
_
\bS_
\bo_
\br_
\bt_
\bm sorts the specified messages in the named folder
according to the chronological order of the "Date:" field
The `-verbose' switch directs _
\bs_
\bo_
\br_
\bt_
\bm to tell the user the
general actions that it is taking to place the folder in
The `-datefield field' switch tells _
\bs_
\bo_
\br_
\bt_
\bm the name of the
field to use when making the date comparison. If the user
has a special field in each message, such as "BB-Posted:"
or "Delivery-Date:", then the `-datefield' switch can be
used to direct _
\bs_
\bo_
\br_
\bt_
\bm which field to examine.
The `-textfield field' switch causes _
\bs_
\bo_
\br_
\bt_
\bm to sort mes-
sages by the specified text field. If this field is "sub-
ject", any leading "re:" is stripped off. In any case,
all characters except letters and numbers are stripped and
the resulting strings are sorted datefield-major,
textfield-minor, using a case insensitive comparison.
With `-textfield field', if `-limit days' is specified,
messages with similar textfields that are dated within
`days' of each other appear together. Specifying
`-nolimit' makes the limit infinity. With `-limit 0', the
sort is instead made textfield-major, date-minor.
For example, to order a folder by date-major, subject-
sortm -textfield subject +folder
$HOME/.mh_profile The user profile
P
\bPR
\bRO
\bOF
\bFI
\bIL
\bLE
\bE C
\bCO
\bOM
\bMP
\bPO
\bON
\bNE
\bEN
\bNT
\bTS
\bS
Path: To determine the user's MH directory
Current-Folder: To find the default current folder
S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
SORTM(1) BSD Reference Manual SORTM(1)
D
\bDE
\bEF
\bFA
\bAU
\bUL
\bLT
\bTS
\bS
`+folder' defaults to the current folder
C
\bCO
\bON
\bNT
\bTE
\bEX
\bXT
\bT
If a folder is given, it will become the current folder.
If the current message is moved, _
\bs_
\bo_
\br_
\bt_
\bm will preserve its
H
\bHI
\bIS
\bST
\bTO
\bOR
\bRY
\bY
Timezones used to be ignored when comparing dates: they
Messages which were in the folder, but not specified by
`msgs', used to be moved to the end of the folder; now
such messages are left untouched.
_
\bS_
\bo_
\br_
\bt_
\bm sometimes did not preserve the message numbering in
a folder (e.g., messages 1, 3, and 5, might have been
renumbered to 1, 2, 3 after sorting). This was a bug, and
has been fixed. To compress the message numbering in a
folder, use "_
\bf_
\bo_
\bl_
\bd_
\be_
\br _
\b-_
\bp_
\ba_
\bc_
\bk" as always.
If _
\bs_
\bo_
\br_
\bt_
\bm encounters a message without a date-field, or if
the message has a date-field that _
\bs_
\bo_
\br_
\bt_
\bm cannot parse, then
_
\bs_
\bo_
\br_
\bt_
\bm attempts to keep the message in the same relative
position. This does not always work. For instance, if
the first message encountered lacks a date which can be
parsed, then it will usually be placed at the end of the
When _
\bs_
\bo_
\br_
\bt_
\bm complains about a message which it can't tempo-
rally order, it complains about the message number _
\bp_
\br_
\bi_
\bo_
\br
to sorting. It should indicate what the message number
will be _
\ba_
\bf_
\bt_
\be_
\br sorting.