On Mon, Sep 4, 2017 at 8:27 AM, Greg Reagle wrote:
> 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
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,
On Mon, Sep 4, 2017 at 7:16 AM, Greg Reagle wrote:
> On Sun, Sep 3, 2017, at 20:06, Mark Volkmann wrote:
> > IIUC, there isn't a command in fish that can be used to compare two
> strings to see if one is greater than the other in sorting order. For
> example, this doesn't work:
> >
> > set v1 'fo
On Sun, Sep 3, 2017, at 20:06, Mark Volkmann wrote:
> IIUC, there isn't a command in fish that can be used to compare two strings
> to see if one is greater than the other in sorting order. For example, this
> doesn't work:
>
> set v1 'foo';
> set v2 'bar';
> if test $v1 > $v2
> ...
> end
>
>
On Sun, Sep 3, 2017 at 5:06 PM, Mark Volkmann
wrote:
> IIUC, there isn't a command in fish that can be used to compare two
> strings to see if one is greater than the other in sorting order. For
> example, this doesn't work:
>
> set v1 'foo';
> set v2 'bar';
> if test $v1 > $v2
> ...
> end
>
>
IIUC, there isn't a command in fish that can be used to compare two strings
to see if one is greater than the other in sorting order. For example, this
doesn't work:
set v1 'foo';
set v2 'bar';
if test $v1 > $v2
...
end
Is there a recommended workaround for this?
--
R. Mark Volkmann
Object Co