Friday, September 06, 2019

Re: Why regex doesn't work in while loop's condition?

On 2019-09-06, Andreas Kusalananda Kähäri <andreas.kahari@abc.se> wrote:

>> read x; while [ "$x" != [abc] ]; do echo "Not a, b or c"; break; done
>
> The shells in the OpenBSD base system do not support matching regular
> expressions with that syntax. You may have been thinking of bash,

Just to head off crazy rumors: bash doesn't either.

--
Christian "naddy" Weisgerber naddy@mips.inka.de

No comments:

Post a Comment