If you use MH commands in your scripts and your script depends on the format of the command's output, you could have trouble if someone edits the MH profile and changes the command's default options. It's usually safer either to give all the command-line options explicitly, right in your shell script, like this:
show -showproc mhl -noheader ...or to make a temporary MH profile (see the script in the Section Explanation of rmmer for an example).
One special note: in UNIX, many users can share the same shell script. If a shell script uses the default scan output without a format file or format string, the user can change the output (in their MH profile files) and there's no way for you to stop it. In other words, scan doesn't have -noform or -noformat switches to override the user's format. To take care of the problem, you can make your own format file that gives the default scan output and run scan in your scripts with -form scan.default. The format file is in the Section The Default scan Format File.
[Table of Contents] [Index] [Previous: Get Information with scan Format Strings] [Next: Problems with folder, inc, and refile]
This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. Copyright © 1991, 1992, 1995 by O'Reilly & Associates, Inc. This file is freely-available; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For more information, see the file copying.htm.
Suggestions are welcome: Jerry Peek <firstname.lastname@example.org>