[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:41:26 +0100 |
On Wed, Nov 20, 2024, 5:56 PM Reuti <reuti@staff.uni-marburg.de> wrote:
>
> > Am 20.11.2024 um 17:49 schrieb Greg Wooledge <greg@wooledge.org>:
> >
> >>> 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.
>
> I got the idea to use `xargs` to split the arguments which include spaces
> to avoid `eval`:
>
> ./configuration.qemu | xargs qemu
>
one type of args are nospace simple args
other is spaces and stuff containing
we needed declare n eval to make up the harder second type
to make quotes interpreted
xargs does it too , split by quotes etc
greets ..
-- Reuti
>
- Re: #!shebang, (continued)
- 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, 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 <=
- Re: #!shebang, #!microsuxx, 2024/11/20
- Re: #!shebang, #!microsuxx, 2024/11/20