Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

folder(1mh)

sortm(1mh)

Name

sortm − sort messages

Syntax

sortm [+folder] [msgs] [−datefield field] [−verbose] [−noverbose] [−help]

Description

The command sortm sorts all the messages in the current folder into chronological order according to the contents of the Date: fields of the messages.  After sorting the messages, sort renumbers the messages sequentially.

You can sort the messages contained in a folder other than the current folder by specifying the +folders argument.  If you do not want to sort all the messages in a folder, you can sort some of them by specifying the msgs argument.  The following example would sort messages 10−30 in the folder called +test.

$ sortm +test 10-30

Messages which are in the folder, but not specified by msgs, are moved to the end of the folder. 

If a folder is given, it will become the current folder. 

The −verbose switch tells sortm to tell you the general actions that it is taking to place the folder in sorted order.

The −datefield <fieldname> switch tells sortm the name of the field to use when making the date comparison. If you have a special field in each message, such as Delivery−Date:, then the −datefield switch can be used to tell sortm which field to examine. If sortm encounters a message without a date-field, or if the message has a date-field that sortm cannot parse, then sortm attempts to keep the message in the same relative position. However, 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 messages being sorted.

When sortm complains about a message which it cannot order, it complains about the message number prior to sorting.

The default settings for this command are:

+folder defaults to the current folder
msgs defaults to all
−datefielddate
−noverbose

Files

$HOME/.mh_profile The user profile

Profile Components

Path: To determine your MH directory
Current-Folder: To find the default current folder

See Also

folder(1mh)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026