On Sun, Oct 11, 2020 at 2:26 AM Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote: > Third, this is checking only that the first character following the > path component is a hex digit but then accepts _anything_ before > "locked". The regex can be tightened to allow only hex digits: > > grep "/locked *[0-9a-f][0-9a-f]* locked$" out && > ! grep "/unlocked *[0-9a-f][0-9a-f]* locked$" out Nevermind this last point. I see that there is other gunk after the hex string but before the `locked` annotation, so this suggestion breaks the test. The other two points -- (1) mandatory whitespace following the path component, and (2) anchoring the pattern -- would be welcome.