A technically literate and practical Linux KZbinr. I don't think I've ever seen one. Subbed!
@BreadOnPenguins2 ай бұрын
Haha thanks very much! :)
@johnbowles47542 ай бұрын
Me too 😊
@OldDogNewLinuxАй бұрын
There are those who know how to streamline the code you showed, but I appreciate that you explained variables, if, case, sed, & awk in just a few lines of code in just 16 minutes. This was helpful for us noobs out here. Thank you.
@BreadOnPenguinsАй бұрын
I appreciate that! I do think it could've been better, but the goal was just some quick and dirty code for showing examples. No problem.
@OldDogNewLinuxАй бұрын
@@BreadOnPenguins I'm very new to bash scripting so your "quick & dirty" is very helpful to see the process, as well as the different options you presented. Keeping it simple for noobs such as myself is appreciated. Knowing there are more advanced ways of doing the same thing is cool, but I'm not quite there yet.
@lupuionut62862 ай бұрын
I hope you maintain interest in this channel and that it grows more. There seems to be some sort of Linux oriented market on youtube, currently. I'm a dude working in CI, where we automate stuff a lot using bash scripts. Probably this video would've helped me when I started out with it, like half an year ago.
@BreadOnPenguins2 ай бұрын
I definitely intend to! Gotcha, it's not a hard learning curve once you've gotten started. Bash scripting is applicable in so many areas, as well.
@DV-ml4fmАй бұрын
You can use the select statement to create and display a menu of items to choose from.
@mauriereed38752 ай бұрын
The case / esac combination comes from the gentleman who wrote the Bourne shell and comes from the Algol programming language which used reversed keywords to mark the end of code blocks. Glad that I discovered your channel a short time ago!
@BreadOnPenguins2 ай бұрын
Thank you for answering! :)
@PreRendered2 ай бұрын
These kinds of videos, where you use several different tools in combination, really show the strength of command-line proficiency. I learn something from every one of your videos! I would love to see you flex more of your sed/awk skillset because that stuff is fascinating.
@BreadOnPenguins2 ай бұрын
Thanks so much - I'm glad to hear that! I'm definitely intending to make full videos for sed, awk, even grep and other tools.
@BrokenKanuck2 ай бұрын
sed and awk are two tools everyone should get to grips with, they're incredibly powerful. Love the vids! Keep it up! Still learning new things even after 30 years of Linux..
@BreadOnPenguins2 ай бұрын
For sure - I'll 100% be making vids on both at some point. Thanks so much :) Glad to hear.
@JD-du3qe2 ай бұрын
excellent video, actual practical example demonstrating multiple concepts, unlike some other first bash script videos I've seen. look forward to more from you! thanks
@BreadOnPenguins2 ай бұрын
Thanks very much! :)
@shayanakhavan6002Ай бұрын
I’m glad I stumbled upon your video! My use of bash scripting has been lost over the years
@BreadOnPenguinsАй бұрын
Thanks for stopping by! I've got several other vids going over other useful/practical scripts as well
@kfhahn11 күн бұрын
awesome video. keep it up!!! way better quality than a lot of linux videos i see (getting to the point, clarity, presentation and audio quality etc)
@Dad-ij2qy17 күн бұрын
I like how the syntax for programming in BASH is so similar to the syntax used in writing C programs -- not exactly, but really close. I suppose it's no big surprise, considering they were both invented at AT&T Bell Labs back in the 1960's/early 70's
@SpaceCatKungFu2 ай бұрын
Wow, you rule! You're a great teacher; much appreciated!!
@BreadOnPenguins2 ай бұрын
Thank you! :)
@marian.fratica2 ай бұрын
Greetings from Romania! Just discovered your channel. Very well-structured content with very clean explanations from such a young girl. :) You can easily become a teacher. :P Keep up the good work!
@BreadOnPenguins2 ай бұрын
Thanks very much :)
@saiswayamshree2 ай бұрын
best concise guide. keep making more such videos
@BreadOnPenguins2 ай бұрын
Thank you! Will do
@techanthology14 күн бұрын
when getting rid of the % on disk used you can also use awk again and specify the delimiter as the % symbol and print out $1 so basically run awk twice in a row...no big deal and I would have probably opted for using sed as well as awk as you did just for demonstration purposes.... well done!
@retagif2 ай бұрын
Thank you very for this on learning bash, truly enlightening video
@BreadOnPenguins2 ай бұрын
Glad it was helpful!
@kalemolala2 ай бұрын
the contents you makes are amazing!
@BreadOnPenguins2 ай бұрын
Thank you! :)
@metalmeditations20362 ай бұрын
SWEET! As promised. Sadly I'm too busy preparing for a professional certification exam to dive into this until week after next, but I am excited to get started.
@BreadOnPenguins2 ай бұрын
Good luck with your exam!
@notafbihoneypot84872 ай бұрын
Based bash🗿 I'm glad I'm watching this from the terminal
@BreadOnPenguins2 ай бұрын
Heck yeah
@krisdjames2 ай бұрын
Closing an if statement with 'fi' is not unique to Bash, it was also the convention in Bourne script, the predecessor to Bash, as well as most other Unix shells, so they just kept it. Dude who wrote Bourne came from Algol 68 where the reverse closing delimiter was originally used. So 'if/fi', 'case/esac' are unique but you close 'do' with 'done' because 'od' was already used. The others like 'while', 'for' or 'until' are called within do and don't need a terminating delimiter. So basically it's just creative arbitrary decisions of old.
@BreadOnPenguins2 ай бұрын
Thanks very much for answering that!
@mrslacker14372 ай бұрын
Let's gooo! THANK YOU! Keep up the good work!
@BreadOnPenguins2 ай бұрын
No problem and thanks for watching! :) Will do
@dralger6 күн бұрын
That's pretty good. When have you started to get into the Linux topic?
@vmisev29 күн бұрын
Nice tutorial! Not trying to nitpick here, but IMHO there is no need for awk (as much as I love it) in this “fisrt script” guide, one can get same result with simpler: df --output=pcent /home | sed -e 1d -e 's/%//' Other than that, it’s an excellent video!
@BreadOnPenguins29 күн бұрын
Thanks for mentioning! You're right - this guide could've been far cleaner; I was trying to cram in as many tools as possible.
@vmisev29 күн бұрын
@@BreadOnPenguins I hear you - both sed and awk are very important; personally I’m comfy with sed, but I’m still only learning awk - after 20 years of using it 😄 IMHO, for any user who is new to *n[i|u]x a key thing to learn about and understand first is regex (+ grep and sed) and how to use them as ‘filters’; learning about scripting is much easier after that. I mean, even MS Word and InDesign users can benefit greatly by learning elementary regex 😎
@lautaroliva182 ай бұрын
Hey Bread, great vid! Also, where do you find your wallpapers?? Thery're great
@BreadOnPenguins2 ай бұрын
Thank you! :) Everything from stock photo sites, to /wg/ threads, to looking through work from artists and photographers
@MocanuAndreiCristian2 ай бұрын
Hey, I like your theme. Your Terminal looks great, your Desktop looks amazing. Would you mind sharing your configurations with us?
@BreadOnPenguins2 ай бұрын
Thank you! I have a few videos going through how I've configured some aspects and will make more on the subject. I will eventually make a repo for dotfiles (but I'll have to clean up and organize everything neatly, first).
@AshesWake-sf7uw2 ай бұрын
Penguinz0 if he was really cool linux person! Love your videos
@BreadOnPenguins2 ай бұрын
Haha thanks so much!
@null11q2 ай бұрын
Luke doesn't care about noobs! Meanwhile, Luke with his AI girl form:
@BreadOnPenguins2 ай бұрын
Lmao
@xmvzironАй бұрын
1:37 Fun fact: you don't even need to look beyond Linux to see that, NixOS doesn't have /bin/bash, so you are forced to put /usr/bin/env bash in the shebang. /bin/sh does exist though.
@BreadOnPenguinsАй бұрын
Good to know! All the more reason to use a universally applicable shebang
@aidenmiller8932 ай бұрын
Super useful content, ty
@BreadOnPenguins2 ай бұрын
Glad to hear! Np
@simon71492 ай бұрын
You can use cut -d'%' -f1 instead of sed. Might be a little bit faster
@BreadOnPenguins2 ай бұрын
For sure, I was going to use cut but figured it was better to introduce people to awk and sed.
@dekooks15432 ай бұрын
not sure if anybody asked before but what keyboard do you use ?
@BreadOnPenguins2 ай бұрын
It's a razer blackwidow v4 atm, but I'm only using it because I got it cheaply from a friend - honestly I wouldn't recommend it since I've had several issues with switches becoming unresponsive, apparently this is a common issue with this model
@karshPrimeАй бұрын
the fastest penguin species is the gentoo penguin, which can reach speeds of up to 36 kmph when swimming
@BreadOnPenguinsАй бұрын
Hence the distro name!
@nikospitr2 ай бұрын
Why the double brackets in " if [[ $myvar -gt 90 ]] ??? Are they really necessary? Also, out of curiosity, why the case needs double ;; to separate choices?
@AnalyticMinded2 ай бұрын
I know you are doing beginner-level tutorials for now, but I hope one day you make one about the more obscure aspects of utilities like sed, awk, xargs, grep, etc. Oh, and regex... :P
@BreadOnPenguins2 ай бұрын
Yeah, those are worth going over especially for maximizing efficiency - I'll keep it in mind. :D
@astrx22 ай бұрын
Can you make a video about your vim setup ?
@BreadOnPenguins2 ай бұрын
Hello, sure! It's on the to-do list :)
@astrx22 ай бұрын
Thank you, you are the best creator !
@vinay_dias2 ай бұрын
A penguins black and white colouring is called counter-shading.
@BreadOnPenguins2 ай бұрын
Hey that's an interesting one, I just looked it up since I hadn't known about it before, apparently it applies to many different animals in order to camouflage. Thanks for sharing!!
@slimkid0225Ай бұрын
BashShcripting🎉
@Lucaux2 ай бұрын
any chance we will see u using wayland ??
@BreadOnPenguins2 ай бұрын
I'll probably make a video about it at some point :)
@VioletJewel17292 ай бұрын
woo woo another good video hehe ^_^
@BreadOnPenguins2 ай бұрын
Thank you!
@TrustJesusToday2 ай бұрын
Fun stuff.
@wilk852 ай бұрын
Hope you are using shell check in daily 'bashing'?
@BreadOnPenguins2 ай бұрын
That's a useful too as well :)
@wilk852 ай бұрын
@@BreadOnPenguins yep, it will keep you on track with latest syntax
Not bash related, but you may want to consider always putting a consistent graphic or photo of a smiling Bread on your video thumbnails. This Bread video almost got overlooked on my little phone.
@BreadOnPenguins2 ай бұрын
Thanks for pointing that out! I'm still experimenting with what thumbnail style works best
@HaukeLaging2 ай бұрын
The shebang line does not tell the shell how to run the script, it tells the kernel how to run the script. It is rather strange to pipe output from awk (the much more powerful tool for text modification) to sed. The solution is to do that in awk (value=$5; sub("%","",value); print value) or in bash: myvar=$( ... ) myvar="${myvar%\%}" But you need neither awk nor sed, you can do that in bash directly: df -h / | ( while read dev v2 v3 v4 percentage rest; do [[ $dev != /dev/* ]] && continue; echo "$percentage"; done )
@BreadOnPenguins2 ай бұрын
I did want to show both awk and sed in the video since those are commonly used tools that are worth introducing, even if that's not the "best" way for that particular example. Regardless, I appreciate the full explanations - thanks for commenting!
@OldDogNewLinuxАй бұрын
@@BreadOnPenguins That's awesome that @HaukeLaging was able to condense the script down to one or two lines. Something to grasp in the future as I learn to crawl before I can run. Thank you for explaining awk & sed. I'm new to bash scripting, just a couple of months now and I'm loving the sed command. It's so powerful and yet I know only 10% of it's capability.
@Gigusx2 ай бұрын
There are penguins in South America
@BreadOnPenguins2 ай бұрын
South America has some very distinctive penguins! The Humboldt penguin is a cool species, super interesting coloring
@Gigusx2 ай бұрын
@@BreadOnPenguins They do have cool coloring! The beaks as well :D
@lukegallo12722 ай бұрын
Luke Smith transitioned? I was wondering where he went... makes sense... typical linux chud
@BreadOnPenguins2 ай бұрын
Lmao
@CyperN0772 ай бұрын
I use the more portable #!/use/bin/env bash
@BreadOnPenguins2 ай бұрын
Yup that's what I would recommend :)
@samoylov1973Ай бұрын
Nice work! Keep it up! (I get it - you want to show several commands. At least you said it in comments) But - your code could and should be better. Why use more than you actually need for a simple task. #!/usr/bin/env bash clear # Prints disk info: essentials df -h | awk '/\/$/ {print "Used: "$3"\t Available: "$4}' And of course you can do more elegantly with "if then else" statements. DT compared you with Luke Smith. So, why not watch Luke's "Never say "If" writing a Bash script" wonderful video? 😺
@BreadOnPenguinsАй бұрын
Hello, thank you for commenting! I have indeed seen Luke's video; if I recall, there was significant debate in the comments over concise vs elegant. Verbosity can be appropriate in the circumstance that others need to quickly and easily understand your code. Given the concept of this video, my priority was packing in as much as possible. I agree that the end result was certainly not elegant, lol But, especially for personal projects, I prefer concise code, and yes, I do avoid if statements! :-)