[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: #!shebang
From: |
Greg Wooledge |
Subject: |
Re: #!shebang |
Date: |
Wed, 20 Nov 2024 10:39:23 -0500 |
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.
- #!shebang, lacsaP Patatetom, 2024/11/20
- Re: #!shebang, Andreas Kähäri, 2024/11/20
- Re: #!shebang, Greg Wooledge, 2024/11/20
- Re: #!shebang, #!microsuxx, 2024/11/20
- Re: #!shebang, Greg Wooledge, 2024/11/20
- Re: #!shebang, #!microsuxx, 2024/11/20
- Re: #!shebang,
Greg Wooledge <=
- Re: #!shebang, #!microsuxx, 2024/11/20
- Re: #!shebang, Greg Wooledge, 2024/11/20
- Re: #!shebang, Reuti, 2024/11/20
- Re: #!shebang, #!microsuxx, 2024/11/20
- Re: #!shebang, #!microsuxx, 2024/11/20
- Re: #!shebang, #!microsuxx, 2024/11/20