Advanced Bash Scripting Tutorial
Vložit
- čas přidán 6. 09. 2024
- This video is not being monetized, and no ads (advertising) should be shown.
Bash, or the Bourne Again Shell, is a widely popular command-line interpreter for administration and programming tasks. It's also the default option on Mac OS X and Linux. But Bash is different than most scripting languages. This course spends some time running you through the syntax-introducing variables, numbers, and control structures-so you can start writing scripts right away. Shows you how to wrap up multiline operations in one file, implement flow control, and interact with users to get input. Plus, offers challenges along the way that allow you to put what you've learned to the test.
0:00 Expansion Shortcuts
3:07 Moving Files/Folders || Standard Input/Output/Errors || Redirection
5:47 Grep - Search files for specific patterns of text || Command Chaining with Grep
9:22 Bash Script Syntax: Shebang
10:27 Creating/Editing Bash Scripts || Running Scripts
12:15 Displaying text with 'echo'
13:32 Variables || Adding attributes to variables || Special Variables
15:35 Command Substitution
16:35 Arithmetic Operations || 'bc' Command (Print floating point)
18:28 Comparison Operations || 20:06 Logic Operators || 20:15 String Null Value
21:06 Conditional Statements
23:40 Two ways to Style Text: Ansi Escape Code and 27:14 'tput'
28:43 Date || Printf
31:18 Arrays: Indexing - Displaying stored strings
33:24 Working with Text Files || Reading Files
35:31 'Here Document': Specify Input freely up to specified limit string
36:58 CHALLENGE#1
37:22 CHALLENGE#1 SOLUTION
40:32 'if' Statement
42:42 Loops: 'while' - 'until'
43:38 'for' loop
46:15 Case Statements
47:33 Function Declaration
49:47 Arguments: Acquiring user input
51:17 Flags - 'getopts' (get options)
53:10 Acquiring Input during execution of Bash script || 'select'
55:32 Error Tolerance || Input Validation
58:11 CHALLENGE#2
58:31 CHALLENGE#2 SOLUTION
Made this for self reference. Figured I'd share in case someone wants to know what you will see in this video.
Pro tip: you can watch series at kaldrostream. I've been using them for watching loads of movies during the lockdown.
@Kade Howard Yup, I have been using Kaldrostream for since november myself =)
@Kade Howard definitely, have been using Kaldrostream for since november myself :D
@Kade Howard yea, been using Kaldrostream for months myself =)
@Kade Howard yea, have been watching on KaldroStream for months myself =)
This is precise and comprehensive. Any minute more will open up a portal to the Multiverse. Great job.
Rare opportunity that someone really knows what he's talking about, instead of usual copy-paste-try-works-on-my-Mac-don't-understand-why-but-now-I-am-mightier-than-you
Closest thing I found to what I'm looking for great job
Wow...
This is everything I wanted...
Very detailed. most of the tutoriald are only focused on the easy stuff
I love the speed too😍
Great ! This will help me creating my scripts even more complex and easy for others.
This video is stolen from Linked Learning (his author is Scott Simpson)
This is his videos ya dummy lmfao 🤣 😂 💀 n y u complaing you get the video for free 😂 💀 🤣
Hence this is from tldp smart guy so who's stealing from who? But you have to get rid of that concept we all learn from one another
what is the course name ?
@@flipinfin You also advocate to work for free? You must be employee of the month.
Here's a tip since this guy is so fast. Change the playback speed to 1.5 so you can keep up.
I just noticed it was like that by default lol
If you want real-time, 0.75x playback
the upper limit of files you mentioned on mac looks awfully similar to the default ulimit setting for open files ive seen on linux distros. Might be worth checking if Mac uses ulimit and whether it can be extended.
very efficient and informative
Awesome video. Who is the Instructor?
Two nasty audio clicks: 6:41 and 19:05
turn on max vol and still hard to listen
this is a treasure
#! Crunch Bang was a cool distro! Like all good things it got forked! I always go Crunch Bang slash bin bash. Captain Crunch and his Magical Whistle@2600Hz would approve.
Great job done, very helpful keep doing goods 😗🙂😗🙂😗🙂😗🙂😗🙂😗🙂
Thank you, I will
I will try to find some time to make my own
Hi. Is shell language a good start point to learn programming/coding? I know it’s a very weird and limited language but is it still a good option to start with? Thanks.
If you want to learn programming in all its complexities, yes. If you want to be a well paid employee of a software company, no. A shell depends very much on the concrete or virtual machine you are on, it is not as abstracted as "higher" languages. Shells might teach you to program robust, but it offers no shiny "paradigms".
if you wanna feel the power of shell scripting you must learn Linux administration first.
I started using Perl and ended up writing a lot of stuff in BASH since you don't have to worry about libraries all the time. Don't be fooled, BASH is very powerful. I have a DIY home security system that I wrote all in a BASH script.
@@hhskladby1596 hi... I'm new(intermediate) to shell scripting...
I will sure need some insights from you
Start with something general purpose, rather than specialized like bash. But if you like it you can start in it and make some scripts to do cool things, besides bash does contain common things such as loops conditions which is mostly what you need to get started, which you can learn by creating these scripts
so cool tutorial
Finally, I know.
Thanks for being Me.
I am just a?
Thankyou, again.
Grate 👍👍👍👍👍
sound is bad , content is cool
Greeeeat !!! Thank you so much.
"This video is not being monetized" is that because you directly lifted this video off of someone's course?
ikr lmao
I was attending to this course, I thought it might be interesting for others.
I share it because in order for a normal person to attend them you would need to pay 30$ monthly, I think that is unfair.
Knowledge is knowledge, should not belong to anyone.
@@cybersecurityshandy9181 You are correct. The people who say you are stealing don't understand how valuable this is to have freely available on youtube versus having to pay. you are doing a good thing.
@@cybersecurityshandy9181 Knowledge and creative work are two different things. Knowledge should be shared. Creative work is the property of its creator until it enters the public domain. You are conflating this work with “knowledge” only because you find it educational, and in doing so you are appropriating the creator’s own work. If you care about this resource being available in the public domain, you need to either ask the owner to release it to the public domain, or you should create new work with new voiceover, visuals, and examples for the same knowledge, and as the creator of that work, release it to the public domain yourself.
@@nickr753 ethical? sounds pretty subjective buddy.
monotonous, far too fast.
change the playback speed to 0.70
it is a litle bite too faste but not monotonous-_-
(i dont see the diferense
)