help-bash
[Top][All Lists]
Advanced

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

Re: #!shebang


From: #!microsuxx
Subject: Re: #!shebang
Date: Wed, 20 Nov 2024 16:53:42 +0100

well ye functionally its same , just one lil less danger than eval

On Wed, Nov 20, 2024, 4:39 PM Greg Wooledge <greg@wooledge.org> wrote:

> On Wed, Nov 20, 2024 at 16:33:46 +0100, #!microsuxx wrote:
> > declare -a "a=( $( <argsf ) )"
>
> OK, that seems to work.  But it also doesn't seem to offer any
> advantages over the eval command.
>
> hobbit:~$ cat z
> -foo $(date >&2)
> # a whole line comment
> -file="a file with spaces"
> -bar # an inline comment
> -q
> hobbit:~$ declare -a "a=( $(<z) )"; declare -p a
> Wed Nov 20 10:38:23 EST 2024
> declare -a a=([0]="-foo" [1]="-file=a file with spaces" [2]="-bar"
> [3]="-q")
>
> The command substitution is still executed, just as it is with eval.
>
>


reply via email to

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