Version 4 of >=

Updated 2007-11-02 17:11:36 by LV

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

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