[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: #!shebang
From: |
#!microsuxx |
Subject: |
Re: #!shebang |
Date: |
Wed, 20 Nov 2024 20:39:06 +0100 |
because eval direct execs cmd
the declare is ' one level ' up in less harm
u can insert $( code
also in eval
its just in declare its one level less
see , eval cmd1 cmd2 ..
declare "bla ( cmd1 cmd2 )"
besides
eval is cmd exec
declare is var settings
.. we are setting vars here
.. i wont eval when i can declare
greets++ :))
On Wed, Nov 20, 2024, 5:49 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.
>
> On Wed, Nov 20, 2024 at 16:53:42 +0100, #!microsuxx wrote:
> > well ye functionally its same , just one lil less danger than eval
>
> That's my point -- it's NOT less dangerous than eval. It's exactly
> the same.
>
> It's arguably worse, not in terms of how it behaves, but because of
> how it's perceived by the reader. Look at your own statement here.
> You think it's "less danger[ous]" than eval. Why? Because you've been
> taught that eval is inherently dangerous?
>
> eval is inherently dangerous; that much is true. But your alternative
> behaves exactly the same way. It's eval, spelled differently. Yet
> you think it's safer. That's a mental pitfall.
>
>
- Re: #!shebang, (continued)
- 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, 2024/11/20
- 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 <=
- Re: #!shebang, #!microsuxx, 2024/11/20