On 2020-08-24 04:43, Tom H wrote:
On Mon, Aug 24, 2020 at 12:53 AM ToddAndMargo via users
<users@lists.fedoraproject.org> wrote:
On 2020-08-23 02:19, Tom H wrote:


If you're worried about not finding a command, set "PATH=..." after
the shebang.

I could use that with /usr/sbin. Sweet. Thank you!

You're welcome.


Exact path helps where things have the same names too:

/etc/alternatives/ifup
/usr/sbin/ifup
/usr/share/bash-completion/completions/ifup
/var/lib/alternatives/ifup

?!

You only need "/usr/sbin" in PATH to use "ifup".

If memory serves me, "/usr/sbin" is in bash's default path
for root only.  I usually put it into my users' path anyway.


You definitely don't need any "completions" in a script.

Not following what you mean by "completions"


The way that alternatives work is that imagine if Fedora offered
ksh93, mksh, and oksh as different versions of ksh and that they were
set up via the alternatives mechanism.

There'd be "/bin/{ksh,ksh93,mksh,oksh}" with "/bin/ksh" being a
symlink to "/etc/alternatives/ksh" and "/etc/alternatives/ksh" being a
symlink to whichever ksh version you wanted to use as ksh.


True.  I started with c shell (csh or something like that)
in Sun OS.

Keep in mind that I call things outside any shell.  If
I know there is a possibility with a bash program that
I will copy and paste to a Raku program, I usually will
include the full path.  It is just a help for me.
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org

Reply via email to