:: Re: [DNG] bash / quote weirdness
Startseite
Nachricht löschen
Nachricht beantworten
Autor: Antony Stone
Datum:  
To: dng
Betreff: Re: [DNG] bash / quote weirdness
On Friday 14 January 2022 at 00:15:28, Hendrik Boom wrote:

> On Thu, Jan 13, 2022 at 12:45:09PM -0500, . via Dng wrote:
> > The shell receives a series of tokens, and tries to interpret the first
> > one as a command. In the double-quoted attempt above, it gets two
> > tokens before the first pipe | ---
> >
> >     1) "cat -n"

> >
> >     2) /etc/fstab

> >
> > Of course, the system has no command named "cat -n".  (And only a chaotic
> > evil person would use a space in a command's name.) Something like
> >     "cat"  "-n"  /etc/fstab

>
> Maybe to keep anyone from executing a potentially dangerous command by
> mistake?


That doesn't sound like the standard *nix approach to me.

Antony.

--
"There is no reason for any individual to have a computer in their home."

- Ken Olsen, President of Digital Equipment Corporation (DEC, later consumed
by Compaq, later merged with HP)

                                                   Please reply to the list;
                                                         please *don't* CC me.