>=

expr comparison operator; returns whether the first argument is greater than or equal to the second argument.

If both arguments are integers, integer comparison is used. Otherwise, if both arguments are numeric (i.e., at least one is a float) float comparison is used. Otherwise, simple string comparison (as in string compare with no options) is used.

Examples

% expr 1 >= 2
0
% expr 1 >= 0
1

# There's a little more to the expr syntax when comparing strings than
# when comparing numbers

% expr abc >= xyz
invalid bareword "abc"
in expression "abc >= xyz";
should be "$abc" or "{abc}" or "abc(...)" or ...
% expr "abc" >= "xyz"
invalid bareword "abc"
in expression "abc >= xyz";
should be "$abc" or "{abc}" or "abc(...)" or ...
% set a "abc"
abc
% set b "xyz"
xyz
% expr $a >= $b
invalid bareword "abc"
in expression "abc >= xyz";
should be "$abc" or "{abc}" or "abc(...)" or ...
% expr {$a >= $b}
0
% expr {abc >= xyz}
invalid bareword "abc"
in expression "abc >= xyz";
should be "$abc" or "{abc}" or "abc(...)" or ...
% expr {"abc" >= "xyz"}
0