Symbol equivalent to NEQ, LSS, GTR, etc. in Windows batch files

The reason operators like > are not used is because they have special meanings in shell scripts. The > is used to redirect output; < used to redirect input, etc.

The documentation from Microsoft lists the following operators:

Operator | Description
EQU      | equal to
NEQ      | not equal to
LSS      | less than
LEQ      | less than or equal to
GTR      | greater than
GEQ      | greater than or equal to

In addition the word not is used to negate a condition.

The reason I want to use symbols is because I thought someone had said for either text or numbers symbols were more efficient than using the text variants.

They were probably referring to bash and its large catalog of operators. It provides different operators for integer and string operands.

Leave a Comment