Комментарии:
Do all distribution /etc/os-release files consistently contain the parameter ID_LIKE as operating system identifier?
I am using Zorin OS, and the os-release file contains:
ID=zorin
ID_LIKE=ubuntu
Would which apt, which pacman, which dnf work as a test case?
ОтветитьI learn a lot from tour videos !
ОтветитьUseful script 👍
Ответить👍Thanks!
ОтветитьIt was really fun for me, I also added a line for CentOS as I am running this OS on my virtual machine with RPM package
ОтветитьYou are a very good teacher !
I like the way you explain
You are awesome
Thank you
I will recommend your channel in Moldova
I've been wanting to make a script for auto update for awhile. This is a huge step in the direction I want to go with my script. Trying to find a way to have it auto reboot if the upgrade command actually upgrades
ОтветитьI may be missing something but why wouldn't you use if else or case statement? Say your on a Arch system the following if statements will be executed witch is wasting resources.
ОтветитьI have tried to write the following simple script:
#!/bin/bash
echo "What is your favorite color?"
read color
select_color () {
echo "What is your favorite color?"
read color
}
x=1
while [ $x -lt 10 ]
do
if [ "$color" = "red" ]
then
echo "Nice one......"
x=20
elif [ "$color" \= "red" ]
then
echo "Pick another color......."
select_color
fi
done
I cannot get it to run on my linux. I intentionally pick a color other than red, but tt stops at the while loop but never runs the procedure on how to pick another color. I also tried red and same thing, it does not tell me nice one. Could you show me where I am going wrong?
Thanks
Great tutorial serie on bash! I have some questions. Wouldn't changing "Debian" to lower case "debian" grep all in os-release file on any system downstream from Debian (i.e Ubuntu, Mint, PopOS etc )work grepping from the ID_LIKE row, thus all deb-depending systems/OS'?
I added below to the script but with the first method, I couldn't find what to grep saying flatpak is/isn't installed (maybe you'll come to that later on).
If anyone is interested...
# If flatpak is installed on this system this should update flatpak apps
# add this variable on top: <extra_repos=/var/lib/flatpak>
if [ -d $extra_repos ]
then
# Additional repositories using flatpak
echo "Flatpak installed on system"
flatpak update
fi
Men the word thanks it's not enough for you <3 👌
Ответить☯🙏
ОтветитьWhy does a script fail even if the example is followed to the detail... for instance a basic ldd lookup & grab dependencies script for bash in Context of creating a chroot environment
ОтветитьThank you very much♥️
ОтветитьNote it doesnt ignore 1st line #!/bin/bash rest treated as comment who start with #
Ответитьa tip for all of you guys. if you arent already using chatgpt or an AI to help with learning i would suggest that you do so. for instance i asked chatgpt about the $(( )) part and it said...."n bash scripting, the $(( ... )) construct is used for arithmetic evaluation. The $ before the (( ... )) is essential for indicating that an arithmetic evaluation is about to take place. Without the $, the (( ... )) construct would be treated differently.
Let's break it down:
(( ... )): This is an arithmetic evaluation construct in bash. It allows you to perform arithmetic operations.
$(( ... )): When you prepend the arithmetic evaluation with a $, it returns the result of the arithmetic operation. This is useful when you want to assign the result to a variable or use it in some other way.
its an incredible learning tool.
Excellent
ОтветитьGreat series but I ran into a snag with this one. I'm running Raspian Bookworm where ID_LIKE=debian - all lower case. Found that grep -iq "Debian" ran the script correctly
Ответитьgood video
Ответитьgreat video
Ответитьyou can write this line like this:
if grep -q "Pop\|Ubuntu" $release_file
etc...
Semi useful is a necessary step for newbies. Several intrinsic "tricks" of the trade in that script, things to own on the automatic level.
ОтветитьThank you
ОтветитьHow the fu*k is this course free
THis is absolute goldmine
instead of checking for "Arch", "Ubuntu", etc, why not just check for the existence of the update commands "pacman", "apt", etc? 🤔
ОтветитьYou give me great inspiration for my work. Many thanks.
Ответитьthnks bro
ОтветитьKeeping everything up to date is not as fun when nvidia ships a driver that segfaults your desktop
ОтветитьBefore watching this video, I created my own update and upgrade bash script when I started watching your channel. I never used the directory path to update a particular application, so now I will start doing some experiments. Thank you again for another great video!!!!
ОтветитьID_LIKE for Arch is arch, nevertheless, these courses are superb!
Ответитьyou could have useed egrep "Ubentu|Debian" instead of writting the whole line with or "||"
Ответитьwhat does grep -q does?
Ответитьis this seris also helpful for mac usrs??
Ответитьwhy you didn't use elif in second if conditions that also fine way isn't
ОтветитьYour videos are AWESOME!!!
Ответить