On Sat, Jan 15, 2011 at 03:35:43PM -0500, Ted Unangst wrote:
> On Sat, Jan 15, 2011 at 3:30 PM, Otto Moerbeek <o...@drijf.net> wrote:
> >> Ehum, running the risk of looking like a complete fool I've got to
> >> ask, is there actually a ksh builtin version of expr?
> >>
> >> I did actually double check that prior to digging into this, with
> >> "whence expr", and now after reading your comment I've skimmed the
> >> man page for ksh as well without finding any reference to a builtin
> >> expr. What am I missing?
> >
> > You are right, I was confused.

x=$(expr $a + $b)

should give the same result as

x=$((a + b))

So it's perfectly ok to demand expr(1) and ksh(1) compatibility.

> although making $(()) handle 64-bit may also be a nice addition.

I've an old diff (from december 2008) around, but IIRC i wasn't
happy with it, because it could break existing shell scripts
(MAILCHECK and TMOUT come into mind).

Ciao,
        Kili

Reply via email to