plan-A
— (Proud Eskimo!)@Unus Nemo
Thanks.
Mine came packed with latest it seem. NOT
bash --version
GNU bash, version 5.2.37(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
not available for me yet..
sudo dnf copr enable c3d/bash
Did you compiled your version of Bash? Is only way with pgp keys ok.
You laid it out, I know
" This works because by default, /usr/local/bin is before /usr/bin on the system path. This is by design. So that local installs by your admin (which is probably you) will override system defaults" which I'm not so found about.
Yes as I said bash 5.2.37 is the default for Fedora. You would have to be on Rawhide Fedora to get Release Candidates (RC) which I do not recommend. Yes, I compiled my bash straight from source from the GNU GIT Server. They sign everything and it is up to you to check the signature or not. Personally I use their savannah git service to get the source from the current maintainers. Though you can download the zip file with sig file if you prefer. We both know I am not nearly as paranoid as you are so I have no issues using their git server. Please note though that any version of bash on github is not the official version. It is just a version someone is playing with. Most GNU projects today use Savannah GNU git, which belongs to GNU.
plan-A likes this.
plan-A
— (Proud Eskimo!)I see now, thanks!
With search engine I had erronous ones..
This one it is.
savannah.gnu.org/git/?group=ba…
The GNU Bourne-Again SHell - Git Repositories [Savannah]
Savannah is a central point for development, distribution and maintenance of free software, both GNU and non-GNU.savannah.gnu.org
which I'm not so found about.
You should be, it was designed that way for a reason. Often you need to maintain the outdated system version so the system will stay stable. While you provide a local copy for your users to use. They can of course if they want to use the system resource instead. Most would not want to. Keep in mind you have to have root access to install to /usr/local/bin
just like you would to install to /usr/bin
. This system has worked quite well for over 50 years. There is no issue with it.
With that said no you would not want to have a program overshadow a system program if you did not know about it. Which is why it is recommended that you not put your Present Working Directory on the system path and if you do, to add it last, never to the front of the path.
plan-A likes this.
I correct that to 50 years. It originated in Unix. Neither env
nor shebang was available in the original version of Unix 55 years ago (hence the correction). And the recommended way for the system path to be implemented is not dangerous at all, and neither is shebang.
You should, unless you happen to be maintaining system scripts, always use the #!/usr/bin/env bash
form and never use the fully qualified path of the software. Let env
find it on the path. This solves many issues. Such as not all software is installed the same place on all systems. Though where it is installed is on the system path.
plan-A likes this.
You are confusing issues with software executing from the Present Working Directory with installed software. It is not dangerous and never has been. Homebrew uses the strategy for a reason, it was designed to work that way. Homebrew did not implement this, it is the way Unix and Unix like systems work. And it works quite well. Even without your approval 😉. You just see everything as a danger.
plan-A likes this.
Unus Nemo
Unknown parent • •@plan-A
why would you go through all that? If you are concerned about someone knowing what your user name is for some reason then just rewrite the motd like this:
I am not exactly concerned about people knowing what my user name is. There is no way they can use that in any scenario to effect me. I literally use the same name here.
In any case dropping the
$(whoami | perl -e 'print ucfirst(<>);')
(as this is the code that retrieves and displays your username with the first letter capitalized) out of the first figlet line will prevent the script from displaying your username.The original motd I shared with you:
Unus Nemo
Unknown parent • •@plan-A
why would you write code just to write more code to eliminate what you just generated? That makes no sense at all. Just eliminate the
whoami
and you do not need to filter its results out withawk
. Remember KISS (Keep It Simple Silly).