Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt
hiddentrue

For example in grib_get you may want to show all messages which have level of 100, 150 or 200. The way to do this is to use the "/" (forward slash) character in the "where" clause (for the -w switch)

% grib_get -w level=100/150/200 ...

How do I use an OR condition (logical disjunction) in a "where" clause?

Step-by-step guide

For example in grib_get you may want to show all messages which have level of 100, 150 or 200. The way to do this is to use the "/" (forward slash) character in the "where" clause (for the -w switch)

Code Block
% grib_get -w level=100/150/200 ...

This can be combined with an "AND" condition (logical conjunction). So if I want to show all messages whose level is either 0 or 1 and whose type is "an":

Code Block
% grib_ls -w level=0/1,dataType=an ...

This would be equivalent to the pseudo-code:

Code Block
languagepython
if (dataType == "an" AND (level == 0 OR level == 1)) ...


Content by Label
showLabelsfalse
max5
spaces~usa
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "kb-how-to-article" and type = "page" and space = "UDOC"
labelskb-how-to-article

...