NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/50827: sh -c ': "${x=$((1))}"' gives bogus syntax error



The following reply was made to PR bin/50827; it has been noted by GNATS.

From: Robert Elz <kre%munnari.OZ.AU@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/50827: sh -c ': "${x=$((1))}"' gives bogus syntax error
Date: Sun, 21 Feb 2016 15:45:39 +0700

     Date:        Sat, 20 Feb 2016 03:50:01 +0000 (UTC)
     From:        Richard Hansen <rhansen%rhansen.org@localhost>
     Message-ID:  <20160220035001.44F947ACAF%mollari.NetBSD.org@localhost>
 
   |  So the NetBSD shell is OK as-is in this regard, though it doesn't hurt
   |  to change the shell to treat "$(("1"))" like "$((1))" because POSIX says
   |  (will say) "unspecified".
 
 Yes, something in one of ether the NetBSD or FreeBSD sources or commit
 logs says something like (paraphrasing)...
 
 	We don't have to do this, but people write code this way
 	[quoted strings inside $(( ))] and expect it to work, so
 	we might as well make it work.
 
 From what I can tell, so far, in my as yet un-committed (not submitted)
 code, all of this stuff is now working fine.  I am still running
 tests (and working on the sh atf tests in general.)
 
 kre
 


Home | Main Index | Thread Index | Old Index