On Mon, Sep 4, 2017, at 11:04, Kurtis Rader wrote:
> Beware `expr`s automatic coercion of strings to ints. If you do `expr '234 < 
> 1234' you'll
> get false despite "234" being lexically greater than "1234". Which may be 
> what you want but
> it's a potential gotcha if you really wanted a string, not int, comparison.

I think you made a mistake or typo there.  You'll get true.  But I see
your point, and it's a good point.  What about doing
   expr a$v1 '<' a$v2
to force them to be interpreted as strings?  Any gotchas there?

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to