Hi David,

> > awk 'length($0) == 0 && e == 1 { next }
> >     { e = length($0) == 0 }
> >     { print }'
> 
> results in:
>   awk: syntax error near line 2
>   awk: illegal statement near line 2
> 
> > Oh, line 1.  `awk --posix' here suggests length would like parenthesis.
> >
> >    awk '!length() && e {next} {e = !length()} 1'
> 
> That didn't help, "awk: syntax error near line 1".

Sigh.  Could it be Solaris is *so* old and crufty it has `oawk' in place
as the default awk?  Does it have a `nawk' for new awk, IOW the one
matching _The Awk Programming Language_ by Aho, Weinberger, and
Kernighan, 1988?  Some 25 years ago?

Apparently, /usr/xpg4/bin/awk is POSIX compliant.  Can build and test
instructions for nmh on Solaris not state /usr/xpg4/bin needs to be up
the front of PATH?

> > I wonder if `diff -b' is the wrong approach as it's applying the -b
> > to the whole file.
> 
> That's OK.  mhfixmsg uses an external program to present html, so the
> output can have arbitrary spacing.  I want to ignore that in the test.

Yep, but that's just on the one line of formatted HTML output;  the -b
is causing diff to ignore any other changes introduced elsewhere.  :-)
Might not matter, I agree.

Cheers, Ralph.

_______________________________________________
Nmh-workers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to