On Tue, Jun 04, 2019 at 07:19:02PM -0400, Chet Ramey wrote:
> On 6/4/19 4:34 PM, mwnx wrote:
>
> > Thanks for the explanation. In view of the change you describe,
> > there is another behaviour that I think might qualify as a bug. I'll
> > give you my actual use case first.
> >
> > I simply want to
On Thu, 6 Jun 2019 at 03:40, Ilkka Virta wrote:
> On 5.6. 17:05, Chet Ramey wrote:
> > On 6/4/19 3:26 PM, Ilkka Virta wrote:
>
> >>$ echo "$(( 'a[2]' ))"
> >>bash: 'a[2]' : syntax error: operand expected (error token is "'a[2]' ")
> >
> > The expression between the parens is treated as if
On Thu, Jun 06, 2019 at 11:33:56AM +1000, David wrote:
> Regarding $((...)) when Chet refers above to "the expression between the
> parens"
> he means whatever is between the parentheses, in this case the three dots.
>
> If I understand correctly, Chet is saying there that $((...)) is
> parsed as
Date:Thu, 6 Jun 2019 09:57:24 +0200
From:mwnx
Message-ID: <20190606075724.GA9670@noisy>
| After all, it does wait for all other
| kinds of processes irrespective of when they were started or how
| many there are,
Shells aren't required to keep track of any proc
On 6.6. 15:53, Greg Wooledge wrote:
wooledg:~$ echo $(( a[$i] ))
Tue 04 Jun 2019 09:23:28 AM EDT
0
wooledg:~$ echo $(( 'a[$i]' ))
bash: 'a[$(date >&2)]' : syntax error: operand expected (error token is "'a[$(date
>&2)]' ")
I definitely got different results when I added single quotes.
Wel
On 6/6/19 8:53 AM, Greg Wooledge wrote:
> On Thu, Jun 06, 2019 at 11:33:56AM +1000, David wrote:
>> Regarding $((...)) when Chet refers above to "the expression between the
>> parens"
>> he means whatever is between the parentheses, in this case the three dots.
>>
>> If I understand correctly, Che
On 6/6/19 3:57 AM, mwnx wrote:
>> Not quite. `wait' without arguments waits for the last process
>> substitution, and the pid of that process is available in $! for the
>> cases you care about. If you are sure that your script hasn't started
>> any asynchronous processes since the last process sub
On 6/6/19 9:12 AM, Robert Elz wrote:
> Whether bash works that way with processes created for process substitutions
> (which are a non-standard thing to do) I don't know however.
The shell doesn't really have to remember them at all -- ksh93 doesn't, for
instance -- but bash remembers the last on
On 6/6/19 4:50 PM, Chet Ramey wrote:
> On 6/6/19 9:12 AM, Robert Elz wrote:
>
>> Whether bash works that way with processes created for process substitutions
>> (which are a non-standard thing to do) I don't know however.
>
> The shell doesn't really have to remember them at all -- ksh93 doesn't,