:: Re: [DNG] [OT] bash / quote weirdne…
Inizio della pagina
Delete this message
Reply to this message
Autore: Antony Stone
Data:  
To: dng
Oggetto: Re: [DNG] [OT] bash / quote weirdness
On Thursday 13 January 2022 at 15:07:22, Hendrik Boom wrote:

> On Wed, Jan 12, 2022 at 05:45:08PM -0500, Steve Litt wrote:


> > [slitt@mydesk ~]$ cat -n /etc/fstab | cut -b 1-20 | head -n5
> >
> >      1    UUID=730eaf92
> >      2    UUID=41abb5fd
> >      3    UUID=96cfdfb3
> >      4    UUID=6F66-BF7
> >      5    tmpfs /tmp tm

> >
> > [slitt@mydesk ~]$ "cat -n" /etc/fstab | cut -b 1-20 | head -n5
> > bash: cat -n: command not found
> >
> > [slitt@mydesk ~]$ "cat -n /etc/fstab" | cut -b 1-20 | head -n5
> > bash: cat -n /etc/fstab: No such file or directory
>
> So if it has parameters it's a command, and if it diesn't it's just
> a file or directory?


It looks a good deal more complicated than that...

$ "cat /etc/fstab"
bash: cat /etc/fstab: No such file or directory

$ "cat fstab"
bash: cat fstab: command not found

I have no idea what's really going on here.


Antony.

--
"It would appear we have reached the limits of what it is possible to achieve
with computer technology, although one should be careful with such statements;
they tend to sound pretty silly in five years."

- John von Neumann (1949)

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