[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Undocumented caret logical operator?
From: |
G. Branden Robinson |
Subject: |
Re: [Help-bash] Undocumented caret logical operator? |
Date: |
Wed, 2 May 2018 14:09:06 -0400 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
At 2018-05-02T13:03:07-0500, Eric Blake wrote:
> On 05/02/2018 12:51 PM, G. Branden Robinson wrote:
> > Can someone tell me what is going on here? This operator is not
> > documented in SUSv4 nor in the Bash man page, at least not per my
> > full-text search. The experiments show that it is not acting as an
> > "undocumented synonym for |" (bashref re: SVR4.2's Bourne shell),
>
> Correct, because it is NOT an operator any more. (only super-old sh, not
> POSIX compatible, treated it as an operator)
[...]
Hah! Of course. If I override my instincts and parse it as an ordinary
uninterpreted argument, everything makes sense. Replace "^" with "ARG"
in all the examples and the behavior is, understandably, identical.
Here's why I asked. There's a piece of OpenSSH that seems to believe ^
is, or might be, an operator. It's down in the weeds of some
shell-detection madness, so I'm not sure if they're on crack or not.
https://pastebin.com/df7jYEib
Thanks, Eric!
--
Regards,
Branden
signature.asc
Description: PGP signature
Re: [Help-bash] Undocumented caret logical operator?, Greg Wooledge, 2018/05/02