bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: non-executable files in $PATH cause errors


From: Greg Wooledge
Subject: Re: non-executable files in $PATH cause errors
Date: Thu, 14 Jan 2021 08:09:53 -0500
User-agent: Mutt/1.10.1 (2018-07-13)

I give up trying to quote appropriate context.  Here's what bash 5.0
is doing:

unicorn:~$ echo "$PATH"
/home/greg/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin
unicorn:~$ type moo
bash: type: moo: not found
unicorn:~$ echo "echo Moooo" > ./bin/moo
unicorn:~$ moo
bash: /home/greg/bin/moo: Permission denied
unicorn:~$ type moo
moo is hashed (/home/greg/bin/moo)

Whether that's correct behavior or not, I can't even guess.

As far as the historical usage of ":" vs. "#!", I would trust Sven
Mascheck's page over all other sources.

https://www.in-ulm.de/~mascheck/various/shebang/

It links to an old "Unix FAQ" that explains the history of the ":" thing,
but Sven's page disputes some of the FAQ's explanation.  You'll need to
read both pages to get the full picture.



reply via email to

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