MH commands expect their files, like the MH profile, to end with a newline character. (In general, you get a newline when you're using a text editor and press RETURN.) The vi editor will automatically terminate the last line with a newline character. Some other editors, including GNU Emacs, may not always put a newline at the end. When you edit an MH file, be careful about this.
A file that doesn't end with a newline can put MH commands like inc into an endless loop. If your MH commands "freeze," be sure that your MH files end with a newline. You can use a UNIX command such as:
% tail -1 file | od -c
000000 s h o w p r o c : m h l \n
000016
to see exactly how a file ends -- the last character should be \n.
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 |
|