From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10787 invoked from network); 18 Jun 2020 11:20:26 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 18 Jun 2020 11:20:26 -0000 Received: (qmail 8810 invoked by alias); 18 Jun 2020 11:20:19 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 46071 Received: (qmail 8797 invoked by uid 1010); 18 Jun 2020 11:20:19 -0000 X-Qmail-Scanner-Diagnostics: from mail-io1-f54.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.3/25842. spamassassin: 3.4.4. Clear:RC:0(209.85.166.54):SA:0(-2.0/5.0):. Processed in 1.414933 secs); 18 Jun 2020 11:20:19 -0000 X-Envelope-From: mikachu@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.166.54 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=SlV9W5LHgHjk2pYWA7Sj8lvapudUDb2lbJsCwtlRUQA=; b=jLU6vRcSH/qL9ct6N517DMz9KjZGmj8WVoUB79N97845ueHXodWNfiazQunnMYiRO/ aKR8Xv0bsM9EsNwW5PLSSniYvhlHmBHivcsTfP//po5Fp7kkzYk02QO5ntV0K0yDa9Rt buzw0YPtFi/IjHVPTbfCujmTsrefrNKdavpBn3JhvGsVI2RU+XCGlBNvh2zTBteLjs3e J6zuMbhOrIBvcvC2VI6Ibj90kSeIE/EkW6JjAsIj+tQLPQ/rX4CdWjJGBvk86L6TpZ74 z/qveXpWQC/XX8Jplei9vRwtNInsvgAQKJ62CnNI3FSYG2mKIvUvujpM4bg/2gQV+Kxm piCQ== X-Gm-Message-State: AOAM532AUDSKJ+tj2802CVtNG58YLMXhsHeoEBqyiHn5sjS1sPWxsXIL W6PVxGrshGWzHQnIczt5W6ER4EWYE9LFEIrc4i3UTg== X-Google-Smtp-Source: ABdhPJxB2Qkc+jhtZmsJc+iVeEtFTBXbMzxh8Ko8aYLmH+AM9hA7XcxYk7Mbo3+a1qARHtG25kU3Azi9HHCSPWPZiOg= X-Received: by 2002:a6b:8b51:: with SMTP id n78mr4289378iod.120.1592479184855; Thu, 18 Jun 2020 04:19:44 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <17B9983F-268E-469C-9506-D5333528A805@larryv.me> From: Mikael Magnusson Date: Thu, 18 Jun 2020 13:19:43 +0200 Message-ID: Subject: Re: bad math expression: illegal character: " To: Bart Schaefer Cc: "zsh-workers@zsh.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On 6/18/20, Bart Schaefer wrote: > On Fri, Jun 5, 2020 at 2:02 PM Lawrence Vel=C3=A1zquez wro= te: >> >> > On Jun 5, 2020, at 2:18 PM, Artur Renault >> > >> > while (( "$#" )); do >> > >> > repro.sh:1: bad math expression: illegal character: " >> >> For what it's worth, dash also rejects this. I assume that it and >> zsh are just more strict about what constitutes a math expression. > > Does anybody know if this is something we should change for sh > emulation, or is it merely another unspecified POSIX corner-case? If this is a POSIX requirement, it must have been very specific about when quotes should be allowed (bash): $ (( "0" )); echo $? 1 $ echo $(( "0" )) bash: "0" : syntax error: operand expected (error token is ""0" ") --=20 Mikael Magnusson