bug-bash
[Top][All Lists]
Advanced

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

Re: set -x vs. n=($@)


From: Lawrence Velázquez
Subject: Re: set -x vs. n=($@)
Date: Sun, 03 Sep 2023 12:15:44 -0400
User-agent: Cyrus-JMAP/3.9.0-alpha0-701-g9b2f44d3ee-fm-20230823.001-g9b2f44d3

On Sun, Sep 3, 2023, at 6:08 AM, Dan Jacobson wrote:
> please either say
> + m=$@
> + n=($@)
> or better:
> + m='a b c'
> + n=('a' 'b' 'c')
> or metion on 
> https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html 
> the special exception.

This behavior is not specific to $@.

        bash-5.2$ a=foo
        bash-5.2$ set -x
        bash-5.2$ b=("$a")
        + b=("$a")

However...

        bash-5.2$ declare -a c=("$a")
        + c=('foo')
        + declare -a c

-- 
vq



reply via email to

[Prev in Thread] Current Thread [Next in Thread]