On Mon, Sep 05, 2022 at 06:05:04PM -0400, Greg Wooledge wrote:
> On Mon, Sep 05, 2022 at 09:55:29PM +0100, Julian Gilbey wrote:
> > if [ ("$1" = "yes" -o "$1" = "YES") -a ("$2" = "red" -o "$2" = "RED") ]
>
> You're doing it wrong. The parentheses have to be quoted, and separate.
>
> [ "(" "$1" =
On Tue, Sep 06, 2022 at 12:03:20AM +0200, Andreas Schwab wrote:
> On Sep 05 2022, Julian Gilbey wrote:
>
> > neither did using \(
> > instead of (, and neither did putting spaces around the parentheses.
>
> You need to do both.
Ah, thanks! May I suggest that adding this information as a note in
Julian Gilbey writes:
> Upgrading to bash 5.2.0(1)-rc2 did not help, neither did using \(
> instead of (, and neither did putting spaces around the parentheses.
It's ugly. The first point is that ( and ) are special characters and
if unquoted are isolated tokens that have special syntax. So in
dead.bashbug
Description: dead.bashbug
On Mon, Sep 05, 2022 at 09:55:29PM +0100, Julian Gilbey wrote:
> if [ ("$1" = "yes" -o "$1" = "YES") -a ("$2" = "red" -o "$2" = "RED") ]
You're doing it wrong. The parentheses have to be quoted, and separate.
[ "(" "$1" = yes" -o "$1" = YES" ")" -a ... ]
I'd strongly recommend that you DON'T do
On Sep 05 2022, Julian Gilbey wrote:
> neither did using \(
> instead of (, and neither did putting spaces around the parentheses.
You need to do both.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something comple
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2 -fstack-protector-strong -Wformat
-Werror=format-security -Wall
uname output: Linux erdos 5.18.0-4-amd64 #1 SMP PREEMPT_DYNAMIC Debian
5.18.16-1 (2022-08-10)
Martin brings up several good points, and I think it's worth figuring out
the direction of the implementation. Bash currently does not have good
syntax for H-values, so a new one is needed. It does not make sense to have
a completely new one, as there are few accepted syntax - python,
JavaScript, P
Rather than var[i1.i2.i3] I suggest a C-like var[i1][i2][i3] as that avoids
ambiguity for associative arrays whose keys might include ".", and makes it
simpler to add floating point arithmetic later.
I would like to allow space in the syntax to (eventually) distinguish
between an object with a fai