mhpath(1mh)
Name
mhpath − print full pathnames of MH messages and folders
Syntax
mhpath [+foldername] [msgs] [−help]
Description
Use the mhpath command to display the full pathname of the specified folder. If you do not specify a folder, mhpath will display the pathname of the current folder.
If you specify a message with its message number, mhpath displays the pathname of the specified message. In the following example, mhpath displays message number three in the folder +inbox.
$ mhpath +inbox 3
/r/phyl/Mail/inbox
You can also specify a number of messages, or a range of messages. The following examples demonstrate mhpath displaying the path name for messages two and five and also two to five, in the current folder.
$ mhpath 2 5
/r/phyl/Mail/inbox/2
/r/phyl/Mail/inbox/5
$ mhpath 2-5
/r/phyl/Mail/inbox/2
/r/phyl/Mail/inbox/3
/r/phyl/Mail/inbox/4
/r/phyl/Mail/inbox/5
If the top of the range that you specify is greater than the last message in the folder, mhpath displays as much of the specified range as possible. Additionally mhpath can take a keyword or a sequence name. The following keywords are acceptable: new, first, last, next, cur and all. The keywords first and last display the pathnames for the first or last message in the specified folder. Both these keywords can be used in conjunction with a number to display the pathnames for the first or last n messages. The following example displays the pathnames for the first 2 messages in the current folder.
$ mhpath first:2
/r/phyl/Mail/test/3
/r/phyl/Mail/test/5
The keyword new displays the pathname for the message after the last message in the folder. You cannot use new as part of a message range.
The keywords prev and next display the pathname for either the last message or the next message relative to the current message of the specified folder. The keyword cur displays the pathname of the current message in the specified folder.
You can use more than one keyword in the same mhpath command line. See the following example.
$ mhpath +test last new
/r/phyl/Mail/test/6
/r/phyl/Mail/test/7
Files
$HOME/.mh_profileThe user profile
Profile Components
| Path: | To determine the user’s MH directory |
| Current-Folder: | To find the default current folder |