Linux Shell Scripting - Advanced

Advanced scripting8 H 13 M

In this course, take a look at some more advanced scripting practices in Linux by learning about Functions, Libraries, Regular Expressions and more.

Just you? Training a whole team? There's an ITProTV plan that fits.

Start Training Today
  • Functions and Libraries
    • Overview
    • Functions
  • sed and awk
    • Intro to Sed
    • Intro to Sed Part 2
    • Intro to Sed Part 3
    • Intro to awk
  • RegEx
    • Regular Expressions
    • Regular Expressions Part 2
  • GUI Scripting
    • Writing Graphical Scripts
    • Writing Graphical Scripts Pt2
  • Advanced sed
    • Advanced sed: Multi-line Commands
    • Advanced sed: Multi-line Commands Part 2
    • Advanced sed: Hold Space for Negation
  • Advanced gawk
    • Advanced gawk: Variables
    • Advanced gawk: Arrays
    • Advanced gawk: Structured Commands
    • Advanced gawk: Formatted Printing and Functions


3 M

itprotv course thumbnailitprotv course thumbnailitprotv course thumbnail
  • Episode Description
  • Transcript

In this series, Daniel and Justin take a look at some of the more advanced scripting practices. Here they will empower your scripts by taking advantage of things like Functions, Libraries, creating graphical elements, sed (Stream EDitor), gawk, and Regular Expression.

[MUSIC] In this segment, we're gonna give you a behind the scenes look at what's to come in our upcoming Advanced Shell Scripting series. I'm really excited to jump into this and I want to give you guys maybe a sneak preview of the topics that we're gonna go through as we work our way through that series. One of the first topics that we're gonna jump into is functions, right? We're gonna learn all about functions, how to create function library, so that we can use those to our ends. And they are a wonderful, magical thing. You guys are gonna really enjoy those. It really makes your code and your scripts to be more portable, more robust. And I really enjoy getting into the functions there. Also, we're gonna talk about, well, we're gonna talk about sed. Sed is an interesting thing, as well. It's a very powerful stream editor where we're gonna be able to manipulate and work with text on the fly, as we go. Actually, even modify the text as well that's inside of our scripts or if our scripts are calling from other areas, other files that are on our system. Sed is a great tool for working with that. Another great tool for working with that as well is gawk. A derivative of the good old fashioned awk, which is a type of formatter, it's for creating and generating reports or manipulating text as well. So a lot of times you'll see sed and awk and together. So I wanna make sure that we walk through looking at sed and gawk as to standalone or working together. Now other things that we want to talk about and touch upon as we work our way through the series is regular expressions. As we all know, if you've worked in any kind of command line environment for any length of time, regular expressions can either be the bane of your existence or heaven sent. Hopefully, we'll get to this part where we understand what they are, how they work, and how we can even work with them with the other tools like sed and gawk. So that'll be a lot of fun to see all these things kind of come together in a culmination. So we're gonna try to work that in there. Other things that we're gonna take a look at, writing graphical scripts. Hm, that'll be interesting, right? We're so used to just saying I have a script, I'm going to fire it off and it does something. And it's kind of a hands off. What if we wanted to have a more hands-on approach? Someone is going to be inputting data, or working through menus, even clicking on things in a GUI type environment, we'll get to even that as well. Very, very cool stuff, so you can add more of a professional polished look to some scripts that an end user might be working with at the end of the day. Other things we're gonna get to is we are going to intro in the. But we're also gonna look at some of its more advance features inside both the sed and gawk programs. And let me tell you what, they do get very robust. They have a lot of functionality, both of them in doing different things. And it will take a little bit of brain power for us to work our way through that. But hopefully, again, at the end of both of those sections of the series, you will be fully enabled to work with some of the more advanced functionality so that your scripts can do even more and have more power at their ready. That being said, I think that's about what we are going to cover when it comes to this part of the series. But if that sounds like something that might interest you, we look forward to seeing you in that upcoming series. [MUSIC]