On 9/6/19 5:27 PM, Theo de Raadt wrote:
Andreas Kusalananda Kähäri <andreas.kah...@abc.se> wrote:
On Fri, Sep 06, 2019 at 02:38:18PM -0600, Theo de Raadt wrote:
Christian Weisgerber <na...@mips.inka.de> wrote:
On 2019-09-06, Andreas Kusalananda Kähäri <andreas.kah...@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.
Doesn't bash perform this task by invisibly calling out to perl?
You're thinking of zsh.
No I'm thinking it is all crazy.
[ is not [[
[[ expression ]]
Similar to the test and [ ... ] commands (described later), with
the following exceptions:
The second operand of the ‘!=’ and ‘=’ expressions are
patterns (e.g. the comparison [[ foobar = f*r ]]
if [[ "$X" == [abc] ]] ; then echo yes ; fi
ksh is in base and is often a user's login shell