Re: ksh: variable substitution in double quoted string

2016-03-03 Thread Todd C. Miller
On Thu, 03 Mar 2016 07:14:43 +0100, "Dmitrij D. Czarkoff" wrote: > Bob Beck said: > > This now starts to sounds sane, although the regress test needs to be > > named like paren-expansion-quotes not xxx-what-do-you-call this... > > The test my previous diff failed was "xxx-what-do-you-call-this-1"

Re: ksh: variable substitution in double quoted string

2016-03-03 Thread Otto Moerbeek
On Thu, Mar 03, 2016 at 07:14:43AM +0100, Dmitrij D. Czarkoff wrote: > Bob Beck said: > > This now starts to sounds sane, although the regress test needs to be > > named like paren-expansion-quotes not xxx-what-do-you-call this... > > The test my previous diff failed was "xxx-what-do-you-call-thi

Re: ksh: variable substitution in double quoted string

2016-03-02 Thread Dmitrij D. Czarkoff
Bob Beck said: > This now starts to sounds sane, although the regress test needs to be > named like paren-expansion-quotes not xxx-what-do-you-call this... The test my previous diff failed was "xxx-what-do-you-call-this-1". Should I rename it to "qouted-brace-expansion-1" and call my new test "qou

Re: ksh: variable substitution in double quoted string

2016-03-02 Thread Bob Beck
This now starts to sounds sane, although the regress test needs to be named like paren-expansion-quotes not xxx-what-do-you-call this... On Wed, Mar 2, 2016 at 4:55 PM, Dmitrij D. Czarkoff wrote: > Dmitrij D. Czarkoff said: >> I recently came across a shell script that uses idiom >> >> var1=var

Re: ksh: variable substitution in double quoted string

2016-03-02 Thread Dmitrij D. Czarkoff
Dmitrij D. Czarkoff said: > I recently came across a shell script that uses idiom > > var1=var1 > var2=var2 > echo "${var1+($var2)}" > > ksh(1) doesn't like it: > > ksh: ${var1+($var2)}": bad substitution > > Meanwhile bash and dash just print: > > (var2) > > Apparently ksh tries to

Re: ksh: variable substitution in double quoted string

2015-12-19 Thread Dmitrij D. Czarkoff
Pablo Méndez Hernández said: > Hi, > > On Wed, Dec 16, 2015 at 8:22 AM, Dmitrij D. Czarkoff > wrote: >> Hi! >> >> I recently came across a shell script that uses idiom >> >> var1=var1 >> var2=var2 >> echo "${var1+($var2)}" >> >> ksh(1) doesn't like it: >> >> ksh: ${var1+($var2)}": bad su

Re: ksh: variable substitution in double quoted string

2015-12-16 Thread Pablo Méndez Hernández
Hi, On Wed, Dec 16, 2015 at 8:22 AM, Dmitrij D. Czarkoff wrote: > Hi! > > I recently came across a shell script that uses idiom > > var1=var1 > var2=var2 > echo "${var1+($var2)}" > > ksh(1) doesn't like it: > > ksh: ${var1+($var2)}": bad substitution > > Meanwhile bash and dash just print

ksh: variable substitution in double quoted string

2015-12-15 Thread Dmitrij D. Czarkoff
Hi! I recently came across a shell script that uses idiom var1=var1 var2=var2 echo "${var1+($var2)}" ksh(1) doesn't like it: ksh: ${var1+($var2)}": bad substitution Meanwhile bash and dash just print: (var2) Apparently ksh tries to parse parenthesis within substituted word. Accordi