Advanced Bash Scripting Tutorial

Sdílet
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.

Komentáře • 57

  • @ReliableRandy
    @ReliableRandy Před 3 lety +62

    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.

    • @kadehoward2371
      @kadehoward2371 Před 3 lety

      Pro tip: you can watch series at kaldrostream. I've been using them for watching loads of movies during the lockdown.

    • @ikeroliver7186
      @ikeroliver7186 Před 3 lety

      @Kade Howard Yup, I have been using Kaldrostream for since november myself =)

    • @deckerfletcher6611
      @deckerfletcher6611 Před 3 lety

      @Kade Howard definitely, have been using Kaldrostream for since november myself :D

    • @daxdeandre700
      @daxdeandre700 Před 3 lety

      @Kade Howard yea, been using Kaldrostream for months myself =)

    • @brayanchandler3374
      @brayanchandler3374 Před 3 lety

      @Kade Howard yea, have been watching on KaldroStream for months myself =)

  • @dassyareg7587
    @dassyareg7587 Před 2 lety +14

    This is precise and comprehensive. Any minute more will open up a portal to the Multiverse. Great job.

  • @hhskladby1596
    @hhskladby1596 Před 2 lety +3

    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

  • @davidarnold1881
    @davidarnold1881 Před měsícem

    Closest thing I found to what I'm looking for great job

  • @giftchukwuemeka8324
    @giftchukwuemeka8324 Před rokem +1

    Wow...
    This is everything I wanted...
    Very detailed. most of the tutoriald are only focused on the easy stuff
    I love the speed too😍

  • @nparashar150
    @nparashar150 Před 3 lety +2

    Great ! This will help me creating my scripts even more complex and easy for others.

  • @alejandromadail
    @alejandromadail Před 3 lety +23

    This video is stolen from Linked Learning (his author is Scott Simpson)

    • @flipinfin
      @flipinfin Před rokem

      This is his videos ya dummy lmfao 🤣 😂 💀 n y u complaing you get the video for free 😂 💀 🤣

    • @flipinfin
      @flipinfin Před rokem +6

      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

    • @95SUJITH
      @95SUJITH Před 10 měsíci

      what is the course name ?

    • @14Anon2
      @14Anon2 Před 6 měsíci +2

      @@flipinfin You also advocate to work for free? You must be employee of the month.

  • @FictionFlareProductions
    @FictionFlareProductions Před 2 lety +4

    Here's a tip since this guy is so fast. Change the playback speed to 1.5 so you can keep up.

    • @perkynson
      @perkynson Před rokem

      I just noticed it was like that by default lol

  • @ChozoSR388
    @ChozoSR388 Před 2 měsíci

    If you want real-time, 0.75x playback

  • @jackle3002
    @jackle3002 Před rokem

    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.

  • @hopeyao2156
    @hopeyao2156 Před 3 lety +3

    very efficient and informative

  • @mab2278
    @mab2278 Před 3 lety +1

    Awesome video. Who is the Instructor?

  • @marcisberzins
    @marcisberzins Před 11 měsíci +1

    Two nasty audio clicks: 6:41 and 19:05

  • @huyhuyt
    @huyhuyt Před rokem

    turn on max vol and still hard to listen

  • @user-fu1my7vw5e
    @user-fu1my7vw5e Před 6 měsíci

    this is a treasure

  • @maxpolaris99
    @maxpolaris99 Před 2 lety

    #! 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.

  • @jaipalkhambra2253
    @jaipalkhambra2253 Před 3 lety +1

    Great job done, very helpful keep doing goods 😗🙂😗🙂😗🙂😗🙂😗🙂😗🙂

  • @soufianta8374
    @soufianta8374 Před 3 lety

    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.

    • @hhskladby1596
      @hhskladby1596 Před 2 lety +3

      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".

    • @randomlabs1784
      @randomlabs1784 Před 2 lety +1

      if you wanna feel the power of shell scripting you must learn Linux administration first.

    • @paulstaf
      @paulstaf Před 2 lety +3

      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.

    • @giftchukwuemeka8324
      @giftchukwuemeka8324 Před rokem

      @@hhskladby1596 hi... I'm new(intermediate) to shell scripting...
      I will sure need some insights from you

    • @sukhmandersingh4306
      @sukhmandersingh4306 Před rokem

      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

  • @arturgogowski8847
    @arturgogowski8847 Před rokem

    so cool tutorial

  • @mikediaz9033
    @mikediaz9033 Před rokem

    Finally, I know.
    Thanks for being Me.
    I am just a?
    Thankyou, again.

  • @rockyscience1515
    @rockyscience1515 Před 3 lety +2

    Grate 👍👍👍👍👍

  • @azizutkuozdemir
    @azizutkuozdemir Před 2 lety +2

    sound is bad , content is cool

  • @marco80551
    @marco80551 Před 2 lety

    Greeeeat !!! Thank you so much.

  • @Zancb
    @Zancb Před 3 lety +2

    "This video is not being monetized" is that because you directly lifted this video off of someone's course?

    • @thefrey9588
      @thefrey9588 Před 3 lety

      ikr lmao

    • @cybersecurityshandy9181
      @cybersecurityshandy9181  Před 3 lety +34

      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.

    • @user-ox1yc1fh8k
      @user-ox1yc1fh8k Před 3 lety +9

      @@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.

    • @nickr753
      @nickr753 Před 3 lety +8

      @@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.

    • @user-ox1yc1fh8k
      @user-ox1yc1fh8k Před 3 lety +1

      @@nickr753 ethical? sounds pretty subjective buddy.

  • @A_Lesser_Man
    @A_Lesser_Man Před 3 lety

    monotonous, far too fast.