nmh-workers
[Top] [All Lists]

Re: improved mh-chart man page

2021-03-23 13:41:22
On 3/23/2021 5:26 PM, Robert Elz wrote:
     Date:        Tue, 23 Mar 2021 08:28:24 -0400
     From:        Paul Fox <pgf(_at_)foxharp(_dot_)boston(_dot_)ma(_dot_)us>
     Message-ID:  
<20210323122824(_dot_)E92CA518004D(_at_)grass(_dot_)foxharp(_dot_)boston(_dot_)ma(_dot_)us>

   | Are we allowed to use $(...) instead of `...` ?

I would.  I cannot imagine any shell anyone is likely to really use
which doesn't support that.


$() is less prone to errors (1, Command Substitution).

I'd also use printf instead of echo - even if the shell doesn't have
printf built in (possible, if unlikely) the command will exist.  echo
is just too bizarre on some systems (especially since *roff input is
a place where \ characters abound, and those are how you can shoot
yourself with echo).

And quote expansions almost always, no matter how safe you believe they
are.

These latter two probably don't matter for the current nmh man page set,
but for the future, who knows.


+1


1)  https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html
--
John Doe


<Prev in Thread] Current Thread [Next in Thread>