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 20:39:54 +0100

i can work on a sys to safely use data in files into vars
if u dont say no

work as in for fun think ..

greets ..

On Wed, Nov 20, 2024, 8:39 PM #!microsuxx <fxmbsw7@gmail.com> wrote:

> 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.
>>
>>


reply via email to

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