Тёмный

Bash Scripting for Beginners: Complete Guide to Getting Started - Universal Update Script (Part 8) 

Learn Linux TV
Подписаться 758 тыс.
Просмотров 49 тыс.
50% 1

Опубликовано:

 

3 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 41   
@ericablack1847
@ericablack1847 Год назад
You are a very good teacher ! I like the way you explain You are awesome Thank you I will recommend your channel in Moldova
@Mugen_FB317
@Mugen_FB317 3 месяца назад
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!!!!
@damianpodgorski6977
@damianpodgorski6977 Год назад
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
@guillermolopez7327
@guillermolopez7327 8 месяцев назад
Can you share it?
@zeppelinmexicano
@zeppelinmexicano 8 месяцев назад
Semi useful is a necessary step for newbies. Several intrinsic "tricks" of the trade in that script, things to own on the automatic level.
@jojobobbubble5688
@jojobobbubble5688 Год назад
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
@MiBaLinuxTech
@MiBaLinuxTech 6 месяцев назад
You give me great inspiration for my work. Many thanks.
@ChristopherJamesCalo
@ChristopherJamesCalo 7 месяцев назад
instead of checking for "Arch", "Ubuntu", etc, why not just check for the existence of the update commands "pacman", "apt", etc? 🤔
@BL810T
@BL810T 11 месяцев назад
Just curious, when you ran the grep -q “Ubuntu” your U was capitalized, but is evident that in the ID_LIKE section of the /etc/os-release file it’s there but lowercase. Had you searched for “ubuntu” instead of “Ubuntu” I believe it may have run the way it was intended. If I’m not mistaken? 8:48
@Foba_Bett
@Foba_Bett 5 месяцев назад
Also my thoughts.
@h2ocombolhas1
@h2ocombolhas1 Год назад
I learn a lot from tour videos !
@Sveto8
@Sveto8 3 месяца назад
ID_LIKE for Arch is arch, nevertheless, these courses are superb!
@sotude9168
@sotude9168 Год назад
Thank you very much♥️
@younesstouzani
@younesstouzani Год назад
Men the word thanks it's not enough for you
@subee128
@subee128 7 месяцев назад
Thank you
@skmplanet9591
@skmplanet9591 9 месяцев назад
great video
@noweare1
@noweare1 11 месяцев назад
Excellent
@Aniki_chan69
@Aniki_chan69 20 дней назад
is this seris also helpful for mac usrs??
@barkhadibraahim1023
@barkhadibraahim1023 5 месяцев назад
thnks bro
@DrakenARTZsteam
@DrakenARTZsteam Год назад
Useful script 👍
@mad8ry
@mad8ry Месяц назад
you could have useed egrep "Ubentu|Debian" instead of writting the whole line with or "||"
@pepe-perez
@pepe-perez 8 месяцев назад
you can write this line like this: if grep -q "Pop\|Ubuntu" $release_file etc...
@mihai6564
@mihai6564 10 месяцев назад
good video
@guilherme5094
@guilherme5094 Год назад
👍Thanks!
@Leverquin
@Leverquin Месяц назад
what does grep -q does?
@robinedminson6461
@robinedminson6461 11 месяцев назад
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
@GrindAlchemyTech
@GrindAlchemyTech Год назад
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
@RECURSIVE_MEMORY_LOGIC
@RECURSIVE_MEMORY_LOGIC Год назад
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
@U1TR4F0RCE
@U1TR4F0RCE Год назад
not all distros have that, Fedora doesn't have it for example I think it's only downstream distros.
@LearnerHarshalRajeshJain
@LearnerHarshalRajeshJain Год назад
Note it doesnt ignore 1st line #!/bin/bash rest treated as comment who start with #
@Kwazzaaap
@Kwazzaaap 4 месяца назад
Keeping everything up to date is not as fun when nvidia ships a driver that segfaults your desktop
@jackelofnar
@jackelofnar Год назад
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.
@j0naslarss0n
@j0naslarss0n Год назад
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: if [ -d $extra_repos ] then # Additional repositories using flatpak echo "Flatpak installed on system" flatpak update fi
@davyshah1074
@davyshah1074 7 месяцев назад
How the fu*k is this course free THis is absolute goldmine
@fictitiousnightmares
@fictitiousnightmares Год назад
9:58 It should work fine if you didn't capitalize the U in Ubuntu right? Since the word ubuntu IS in the os-release for your system. 15:09 That wouldn't have fixed it either since you have a capital D in Debian. By changing it to Pop you are just cheating as far as I'm concerned. :P
@brojam11
@brojam11 Год назад
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
@MrLachoxs
@MrLachoxs Год назад
Qué tal amigo, el condicional 'elif' está de más, con un 'else echo "pick another color"', es suficiente. Después, puedes reducir tu código eliminando la redundacia de volver a preguntar el color favorito usando tu misma función correctamente select_color. Te dejo el código corregido: #!/bin/bash select_color(){ echo "What is your favorite color?" read color } x=1 while [ $x -lt 10 ] do select_color if [ $color = "red" ] then echo "Nice one" x=11 else echo "Pick another color" fi done Sé que es demasiado tarde para responder a tu duda pero quizás pueda ser útil para alguien. Saludos desde Tamaulipas, tierra caliente.
@markjones3107
@markjones3107 Год назад
Would which apt, which pacman, which dnf work as a test case?
@helloimatapir
@helloimatapir Год назад
Try it out! The thing about programming is that you can write code in a completely different way, but still get the same outcome.
@Alpha_Sadigh
@Alpha_Sadigh Год назад
☯🙏
Далее
AI News Live!
Просмотров 190
Лиса🦊 УЖЕ НА ВСЕХ ПЛОЩАДКАХ!
00:24
Airpod Through Glass Trick! 😱 #shorts
00:19
Просмотров 2,7 млн
iPhone 16 & beats 📦
00:30
Просмотров 118 тыс.
Linux New User Guide: 10 Things I Wish I Knew
23:31
Просмотров 464 тыс.
Linux Crash Course - The sed Command
15:25
Просмотров 125 тыс.
Write Your Own Bash Scripts for Automation [Tutorial]
16:35
Ansible Crash Course 07 -when condition
13:15
Become a bash scripting pro - full course
36:00
Просмотров 59 тыс.
Лиса🦊 УЖЕ НА ВСЕХ ПЛОЩАДКАХ!
00:24