[GRASS-user] !~: event not found

hello
this command gives error

d.vect map=jeo2 fcolor=green where="label~'CAMURTASI' and label !~ 'KUMTASI'" type=area
bash: !~: event not found

But it works in psql side

what is the alternative of "!~" in grass ?

regards

--
Ahmet Temiz

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

temiz wrote:

this command gives error

d.vect map=jeo2 fcolor=green where="label~'CAMURTASI' and label !~ 'KUMTASI'" type=area
bash: !~: event not found

But it works in psql side

what is the alternative of "!~" in grass ?

"" quoting does not stop bash from expanding $VAR and ! events.
Usually you would use '!' for that, but in this case ....

try
  where="label~'CAMURTASI' and label "'!'"~ 'KUMTASI'"

? but there's probably a better way..

Hamish

Hamish wrote:

> this command gives error
>
> d.vect map=jeo2 fcolor=green where="label~'CAMURTASI' and label !~ 'KUMTASI'" type=area
> bash: !~: event not found
>
> But it works in psql side
>
> what is the alternative of "!~" in grass ?

"" quoting does not stop bash from expanding $VAR and ! events.
Usually you would use '!' for that, but in this case ....

try
  where="label~'CAMURTASI' and label "'!'"~ 'KUMTASI'"

? but there's probably a better way..

If you don't use history expansion, "set +H" turns it off.

--
Glynn Clements <glynn@gclements.plus.com>