On Fri, Dec 05, 2014 at 10:27:40PM -0800, Michael Blume wrote: > > We have had trouble in the past with "wc -l" output not being strictly > > portable. I do not recall offhand which systems, but it is a good bet > > that this is the culprit. Doing: > > > > grep ^X-Mailer: out >mailer && > > test_line_count = $expected mailer > > > > should fix it. It might be even nicer to actually compare the x-mailer > > line we find to an expected output, but that may introduce complications > > if the value changes with the version or something (you'd have to > > sanitize the output, and then I do not know that the test is really > > buying much over just seeing whether it exists). > > > > -Peff > > Actually need to drop the '&&', but yes, that works perfectly, thanks =) Ah, right, we might be looking for 0 sometimes. The right way to do it without destroying the &&-chaining is: { grep ^X-Mailer: out || true } && test_line_count = $expected mailer -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html