From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Cc: Junio C Hamano <gitster@pobox.com>,
GIT Mailing-list <git@vger.kernel.org>,
jon.seymour@gmail.com
Subject: Re: Re*: [PATCH] t1503: Fix arithmetic expansion syntax error when using dash
Date: Sat, 25 Sep 2010 17:24:05 +0000 [thread overview]
Message-ID: <AANLkTimdUC++Lq1z4i5E8cw5ej7nQhZ6hcNoffQ1tM9i@mail.gmail.com> (raw)
In-Reply-To: <4C9E2CA6.2070805@ramsay1.demon.co.uk>
On Sat, Sep 25, 2010 at 17:08, Ramsay Jones <ramsay@ramsay1.demon.co.uk> wrote:
> Junio C Hamano wrote:
>> POSIX wants shells to support both "N" and "$N" and requires them to yield
>> the same answer to $((N)) and $(($N)), but we should aim for portability
>> in a case like this, especially when the price we pay to do so is so
>> small, i.e. a few extra dollars.
>
> Indeed
>
>> By the way, on my box, I get this:
>>
>> $ ls l /bin/dash
>> -rwxr-xr-x 1 root root 104024 2008-08-26 02:36 /bin/dash*
>> $ dpkg -l dash | grep '^ii'
>> ii dash 0.5.4-12 POSIX-compliant shell
>> $ /bin/dash -c 'N=20 ; echo $(( N + 3 ))'
>> 23
>
> Ah, yes, I should have checked for this... particularly since I now
> vaguely remember reading that this had been "fixed"... *blush*
> Sorry about that.
>
> For the record, on my system I get:
>
> $ ls -l /bin/dash
> -rwxr-xr-x 1 root root 80500 2007-03-05 06:00 /bin/dash*
> $ dpkg -l dash | grep '^ii'
> ii dash 0.5.3-5ubuntu2 The Debian Almquist Shell
> $ /bin/dash -c 'N=20; echo $(( N + 3 ))'
> /bin/dash: arith: syntax error: " N + 3 "
>
>> I just left it vague by saying "e.g. older dash" in below, but we may want
>> to be more precise in the documentation.
>
> I found a bug report:
>
> http://bugs.launchpad.net/ubuntu/+source/dash/+bug/92189
>
> which had a post against it which implied that this was fixed in
> version 0.5.4-3. I went over to packages.debian.org to read the
> ChangeLog for this version, but I could not conclude anything
> from that text. :(
>
> Do we need to be more precise?
If you want to spend the effort to track it down that would be
great. There's a dash git repository on kernel.org you can probably
bisect:
http://git.kernel.org/?p=utils/dash/dash.git;a=summary
next prev parent reply other threads:[~2010-09-25 17:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-21 17:45 [PATCH] t1503: Fix arithmetic expansion syntax error when using dash Ramsay Jones
2010-09-22 19:15 ` Re*: " Junio C Hamano
2010-09-22 21:38 ` Jon Seymour
2010-09-25 17:08 ` Ramsay Jones
2010-09-25 17:24 ` Ævar Arnfjörð Bjarmason [this message]
2010-09-29 19:57 ` Ramsay Jones
2010-09-25 17:58 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTimdUC++Lq1z4i5E8cw5ej7nQhZ6hcNoffQ1tM9i@mail.gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jon.seymour@gmail.com \
--cc=ramsay@ramsay1.demon.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).