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.
This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. It 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 COPYING.
Copyright © 1991, 1992, 1995 O'Reilly Media, Inc.
Last modified: 2006-05-31 15:13:43 -0700