On Wed, Oct 15, 2014 at 01:24:26PM -0700, Evan Gates wrote: > After looking at the sbase TODO I threw together test(1). As far as I > can tell it's POSIX compliant. I used the POSIX description[0] to > write it. It exits 0 for true, 1 for false, and 2 for bad input. Let > me know what's good and what's bad. I'll work on addresing those > concerns and getting it into sbase format so I can submit a patch. > > It specifically doesn't support parentheses and the -o and -a flags as > 1) they are obsolete xsi extensions[1] > 2) boolean operators are and should be handled by the shell. e.g. [ > foo = bar ] || [ 4 -lt 5 ]
I kind of like this particular implementation of test(1). Are there any obvious deficiencies compared to the sbase implementation? I will have a look at it in more detail later. I think we should replace the sbase implementation with this one though.