Date:        Mon, 28 Nov 2022 02:53:40 +1000
    From:        Martin D Kealey <mar...@kurahaupo.gen.nz>
    Message-ID:  
<CAN_U6MXYV6Ukq9DC7XFKSZm-XPEbTJM=n84bsbqxuxhc7db...@mail.gmail.com>

  | The expansion `$[var+replacement}` was part of the Bourne shell when I used
  | it in 1985 (before POSIX was first published),

>From the original Bourne sh (released outside Bell Labs in 1979)

  | whereas `test A -gt B` is rather newer,

No, same vintage.   All appeared in 7th edition - though test wasn't
built into the shell back then (still worked just the same, just a bit
slower).

  | and `test -v` is only a Bash extension (and similarly wasn't
  | added until later).

Yes.

There's also no need to use [[ ]] for this, good old test (or [ ])
works for everything described here, except -v, (and is portable).

kre


Reply via email to