Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
syntax:ccmd:conditional_expression [2017/02/06 23:55] fgrose [Description] Added note on quoted <PATTERN> forcing literal matching |
syntax:ccmd:conditional_expression [2017/02/08 22:30] fgrose [Table] highlight the consequence of quoting a PATTERN |
||
---|---|---|---|
Line 15: | Line 15: | ||
| ''<EXPRESSION1> **&&** <EXPRESSION2>'' | ''TRUE'' if ''<EXPRESSION1>''**and**''<EXPRESSION2>'' are ''TRUE'' (do **not** use ''-a''!) | | | ''<EXPRESSION1> **&&** <EXPRESSION2>'' | ''TRUE'' if ''<EXPRESSION1>''**and**''<EXPRESSION2>'' are ''TRUE'' (do **not** use ''-a''!) | | ||
| ''<EXPRESSION1> **||** <EXPRESSION2>'' | ''TRUE'' if ''<EXPRESSION1>''**or**''<EXPRESSION2>'' is ''TRUE'' (do **not** use ''-o''!) | | | ''<EXPRESSION1> **||** <EXPRESSION2>'' | ''TRUE'' if ''<EXPRESSION1>''**or**''<EXPRESSION2>'' is ''TRUE'' (do **not** use ''-o''!) | | ||
- | | ''<STRING> **==** <PATTERN>'' | ''<STRING>'' is checked against the pattern ''<PATTERN>'' - ''TRUE'' on a match \\ But see the note on quoting the pattern below¹. | | + | | ''<STRING> **==** <PATTERN>'' | ''<STRING>'' is checked against the pattern ''<PATTERN>'' - ''TRUE'' on a match \\ //But note¹, quoting the pattern forces a literal comparison.// | |
| ''<STRING> **=** <PATTERN>'' | equivalent to the ''=='' operator | | | ''<STRING> **=** <PATTERN>'' | equivalent to the ''=='' operator | | ||
| ''<STRING> **!=** <PATTERN>'' | ''<STRING>'' is checked against the pattern ''<PATTERN>'' - ''TRUE'' on **no match** | | | ''<STRING> **!=** <PATTERN>'' | ''<STRING>'' is checked against the pattern ''<PATTERN>'' - ''TRUE'' on **no match** | |