How Do BASH Scripts Even Work?!?

Поделиться
HTML-код
  • Опубликовано: 22 авг 2024

Комментарии • 35

  • @beric1704
    @beric1704 2 года назад +3

    Go Shawn, Go Shawn - I'm in - let's do this.

  • @aaronconaway7555
    @aaronconaway7555 2 года назад +1

    Your SHEBANG made me LOL, I remember learning about bang (!), splat (*) in UNIX ages ago. They said they came about from people telling code to each other in a noisy room or with distance between coders--was easier than saying "Exclamation point." Huh? "BANG!"

    • @shawnp0wers
      @shawnp0wers  2 года назад +1

      Ha! I didn’t know that, how cool. :D

  • @YasharImanlou
    @YasharImanlou 2 года назад +1

    Over a decade that I'm enjoying your tuts! You're awesome! 👊🏻❤️

    • @shawnp0wers
      @shawnp0wers  2 года назад

      Thanks!!! I’m really enjoying making videos again. :)

  • @douglaspiresmartins2955
    @douglaspiresmartins2955 2 года назад

    THANK YOUUUUU.
    This was exactly I was looking for. I was trying to deploy resources in azure using Azure CLI and I used a bash script to automate these tasks. Commands with spaces, such as az group create --name and yadayada I was struggling on it.
    I can't thank you enough for this!!!!

    • @shawnp0wers
      @shawnp0wers  2 года назад +1

      I'm so glad it was helpful!!

  • @damianpodgorski6977
    @damianpodgorski6977 2 года назад

    Hi Shawn, I am so glad that there is a series on bash scripting on your channel! It is a corner-stone skill for would-be Linux sys-admins and is a very cool skill to have under your belt. I will watch the remaining episodes in this playlist

    • @shawnp0wers
      @shawnp0wers  2 года назад +1

      Sweet, thank you! As I think of more interesting things to do with BASH, I will add videos. But it contains most of what I do with BASH on a daily basis. :)

    • @damianpodgorski6977
      @damianpodgorski6977 2 года назад

      @@shawnp0wers it would be awesome Shawn

  • @Daavisonfire
    @Daavisonfire 2 года назад +1

    This was a great video! Glad I found this channel. Linux has been a bit overwhelming to me coming from CCNA studies.

  • @shaneyb_80
    @shaneyb_80 Год назад

    Super late to the game on this but working through the playlist for Bash to do assignment 2 - so far I think I've started to see some snags (an obvious typo) but these videos are amazing. Love the content and the way you help instruct and just communicate with the audience is a pleasant change. Looking forward to the rest of the videos.

    • @shawnp0wers
      @shawnp0wers  Год назад

      Thanks! And there's a bit of irony that I'm responding to a comment about communication NINE DAYS LATER.
      I know it's a "good problem" to have lots of communication, but I worry about when I can't keep up. Thanks for being awesome. :)

  • @voytechj
    @voytechj 2 года назад

    @8:30 formatting is different because output of "date" command is pre processed by bash before echo is executed. White spaces are removed and each string is passed as a separate parameter to a main function in echo program. If you want to preserve spaces use double quotes (call echo "`date`" or echo "$(date)").
    There is a useful lint tool "shellcheck" that can show you basic issues inside you shell script.

  • @WilliamDye-willdye
    @WilliamDye-willdye 2 года назад +1

    For several years now, most of my programming has been in bash. I don't love it, but as Bjarne (C++) Stroustrup noted, "there are only two kinds of languages". :-)
    One bit of advice to those getting started: smart programmers overcome language limitations, wise programmers avoid them. Bash scripts are either very short, or very bad. If your code keeps growing, split it into single-purpose reusable tools, reconsider your larger goals, or switch to another language.

    • @shawnp0wers
      @shawnp0wers  2 года назад +2

      This is really good advice. But I have to admit, I have done some SHAMEFUL things using multiple languages... For example:
      Writing a BASH interface that calls a CLI PHP script to pull values out of an API which I then (using BASH) send that value to a Python script to do complex calculations, and return the value back to the BASH script. I have a bad habit of learning JUST enough of a language to make it do what I need, and not one command more. LOL
      (I have gotten better at just using Python for most of the heavy lifting I can't effectively do with BASH -- but PHP was my first non-BASH language, so it's hard to not fall back to things I'm familiar with)

  • @abdirahmann
    @abdirahmann 2 года назад

    This series is gonna be GREAT can't wait. 😊 i love this. thanka alot.

  • @jphenri
    @jphenri 2 года назад

    Thanks for your video! I just found your channel from Chuck's podcast.

  • @sembutininverse
    @sembutininverse 2 года назад +1

    awesome 👍🏻, thank you for the video 🙏🏻

  • @TheRexhim
    @TheRexhim 5 месяцев назад

    Dammmm...vi for 20 years??? I'm only learning it now! 🙂

  • @alexkotusenko
    @alexkotusenko Месяц назад

    Awesome video, thank you

  • @networkgeek5091
    @networkgeek5091 2 года назад

    Waiting....shawn please also make a tutorial how to pass expect output as parameters directly to bash script for further processing

    • @shawnp0wers
      @shawnp0wers  2 года назад +1

      I have an outline of about a dozen videos - one is on I/O, I’ll be sure to include expect. Thank you. :)

  • @chadgrewal4829
    @chadgrewal4829 Год назад

    Good Series. Just the colour of your terminal script is hard to see.

  • @alexyavorskiy1526
    @alexyavorskiy1526 Год назад

    Nice bracelet! Thank you for useful content. Slava Ukraini! 🇺🇦

  • @samplesandtests
    @samplesandtests 2 года назад

    I was starting to feel like I was the only one that used nano.

    • @shawnp0wers
      @shawnp0wers  2 года назад +1

      lol -- it's so silly that I DON'T use nano, it's just decades of muscle memory. Nano is awesome. :)

    • @samplesandtests
      @samplesandtests 2 года назад

      @@shawnp0wers I have used Nano since before it was Nano, when it was Pico (PIne COmposer ). I am no expert on it but it does what I need to do. Nano is what I use in my videos.

    • @shawnp0wers
      @shawnp0wers  2 года назад

      Ok, so you're one of the few people who could actually have this conversation, lol.
      Michigan Tech had both Pine and Elm email clients available, but when I was there, Pine wasn't installed on all clients, whereas Elm was. And since Elm used vi as the editor, that's where I first started using it.
      One of my close friends still uses Mutt as his only email client. He's much cooler than me. :)