On Sun Jun 14 14:12:13 PDT 2015, [email protected] wrote: > Why doesn't the plan9 test program have features for checking > inequalities (i.e. greater than etc.)? > What do you guys do when you want to test for inequality? > > Maybe the most convenient way to do that in the shell would be if I > made two tiny programs, lt & gt which would check their two arguments.
to be more pedantic than necessary, test is not part of the plan 9 shell. the ~ operator is the way to test for (string) equality or inequality. ! is shell negation, so for non-negative integral x, ~ $x [1-3] -> x < 4 ! ~ $x [1-3] -> x >= 4 the shell doesn't understand numbers. outside the shell, hoc or awk are alternatives to test - erik
