[GRASS-user] How to quote temporal algebra expressions when using the inverse selection operator ! ?
nik at nikosalexandris.net
nik at nikosalexandris.net
Thu Apr 15 05:37:35 PDT 2021
On 2021-04-15 11:23, nik at nikosalexandris.net wrote:
> In one of the t.rast.algebra related tests, the use of the ! operator
> is demonstrated [0]:
>
> t.rast.algebra", expression="R = A {!:,during} C", basename="r"
>
> [0]
> https://github.com/OSGeo/grass/blob/99464f8f520a8778564bafa9b2b47bcd8f893bf8/temporal/t.rast.algebra/testsuite/test_raster_algebra.py#L642)
>
>
> I can't seem however to use it properly (in the command line, Linux,
> bash ver. 5.0.7).
>
> This
> ```
> t.select -d expression="C = a1 : a2"
> ```
> works, while this
> ```
> t.select -d expression="C = a1 !: a2"
> ```
> fails with
> ```
> bash: : unrecognized history modifier
> ```
> ?
>
> How should such an expression be quoted?
Unsure if the following is correct, it seems to work here:
```
for RELATION in equal follows precedes ;do
t.select -s -d expression='A = A1 {!:, '"${RELATION}"'} A2'
done
```
Nikos
More information about the grass-user
mailing list