On Thu, May 22, 2014 at 3:26 AM, Pádraig Brady <p...@draigbrady.com> wrote: > On 05/22/2014 03:28 AM, Jim Meyering wrote: > q> Nice. Thanks! >> What do you think about using e.g., >> >> grep -vE '^0x(....|........)$' >> >> instead of that latter sed invocation? >> Then any offending hex string would be printed. > > Well the previous did actually print the offending hex strings (since they > start with 0x), > however your technique of just using an anchored grep expression is better. > Though now, regex golf! I'm now using the following to also flag lower case > hex, > which also give false positives with `make src/fs-magic-compare`: > > grep -Ev '^0x([0-9A-F]{4}){1,2}$ > > I'll push the attached later.
Even better! :-) Thanks.