On Tue, Apr 10, 2018 at 11:05:12AM +0000, Brian Hunt wrote:
>>  The caret in itself was not the problem, only that it was not escaped
>> for the shell.  Testing a regexp, with -E of course, is just as robust,
>> and allows us to be more specific about what we test.
> 
> Either is fine I am sure

  That’s what I was saying.  But you seemed to imply that grep -F 'musl'
was preferable to grep -E '^musl' from a portability and robustness
point of view.

>>  grep -E '^musl' works just as well; and as I explained, -q may return 0
>> even if there are errors, so should be avoided.
> 
> The -q is superfluous with the >/dev/null, and should be removed;
> incidentally though, is it not harmless in this case?

  It is not.  In Thomas’ case, using grep >/dev/null would have avoided
a 0 exit status and thus prevented his system from being erroneously
detected as supporting musl.

        Best,

                Arthur
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to