:: Re: [DNG] [OT] bash / quote weirdne…
Startseite
Nachricht löschen
Nachricht beantworten
Autor: Antony Stone
Datum:  
To: dng
Betreff: Re: [DNG] [OT] bash / quote weirdness
On Thursday 13 January 2022 at 18:19:23, Benjamin Riefenstahl wrote:

> Steve Litt writes:
> > [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
>
> When there is a "/" in the command name, that is a file that has to exist by
> that exact name (the file name can be relative, though).
>
> When there is no "/", then and only then the command is searched along
> $PATH, and if it is not found there, the error message is different from the
> other case.
>
> At least that is my explanation.


This makes excellent sense and is a good explanation, I believe.

Thanks,


Antony.

--
Anyone that's normal doesn't really achieve much.

- Mark Blair, Australian rocket engineer

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