Hi all,
the bash reference manual states in chapter 3.5.7: "The shell scans
the results of parameter expansion, command substitution, and
arithmetic expansion that did not occur within double quotes for word
splitting.". I thought I had understood this, but then came across a
problem.
Let's look
ite sure about is that the behavior, whether or not
it is correct, should not differ between the two variants. The
attributes -a and -i in this case should not make any difference, but
actually make a fundamental difference.
Thank you very much, and best regards,
Binarus
On 28.08.2020 17:28, Greg Wooledge wrote:
> On Fri, Aug 28, 2020 at 10:56:34AM +0200, Binarus wrote:
>> #!/bin/bash
>>
>> function Dummy() {
>>
>> local -n namerefArray="$1"
>> local -a -i myArray=("${namerefArray[@]}")
&g
On 28.08.2020 17:37, Oğuz wrote:
> 28 Ağustos 2020 Cuma tarihinde Greg Wooledge yazdı:
>
>> On Fri, Aug 28, 2020 at 10:56:34AM +0200, Binarus wrote:
>>> #!/bin/bash
>>>
>>> function Dummy() {
>>>
>>> local -n namerefArray="$1&quo
rs
until bash 5.1 arrives in debian (the current testing and even the
current unstable obviously will include 5.0).
The second script not copying the integer attribute is no problem. We
can just use the first script :-)
Once again, thank you very much for all your effort and testing!
Best regards,
Binarus
At first, thank you very much for your effort and the understandable
explanation.
On 28.08.2020 20:28, Robert Elz wrote:
> Date:Fri, 28 Aug 2020 18:25:23 +0200
> From: Binarus
> Message-ID: <8313a366-6ecd-5e87-5552-6a4e0fe18...@binarus.de>
>
>
Thank you very much for your effort, testing and support!
On 29.08.2020 01:46, Koichi Murase wrote:
> 2020-08-28 22:04 Binarus :
>> Description:
>>
>>
>> Under certain circumstances, assignments of namerefs to local variables
>> in functions beha
On 30.08.2020 02:59, Koichi Murase wrote:
> 2020-08-29 14:46 Binarus :
>> I am wondering when debian will include bash 5.1. It looks like
>> debian testing and debian unstable are on bash 5.0, so it will
>> probably take several years.
>
> Actually the problem of th
anything that is more
complex than a one-liner. Even though bash 5.1 seems to solve my current
problem, I suspect that there are more surprises like this which I just
haven't come across yet.
Thank you very much, and best regards,
Binarus
On 30.08.2020 20:01, Koichi Murase wrote:
> 2020-08-30 19:24 Binarus :
> Yes, I recognize the problem when the function isn't properly used.
> But, the use of eval itself is not fatal. When another user can call
> the function as in your example,
>
> Dummy '
10 matches
Mail list logo