Shell scripting for humans

- 33%

0
Certificate

Paid

Language

Level

Beginner

Last updated on February 5, 2023 10:13 am

Learn shell scripting in bash and gain a solid understanding of Linux and programming concepts. This hands-on course covers everything from basic commands to advanced topics, allowing beginners to start creating their own scripts. Whether you’re new to Linux or already familiar with other operating systems, you’ll find value in this comprehensive course. Automate tasks, manipulate text files, use variables and conditionals, write loops, and create command line utilities. With a focus on practical examples and explanations, this course is suitable for both personal and professional development.

Add your review

What you’ll learn

  • How to write shell scripts in bash
  • How to use the command line
  • How to use vim to create files
  • How to parse and manipulate strings and text files
  • How to use variables
  • How to use conditionals to take action if something is true or false
  • How to write loops to repeat a process
  • How to understand logic and programming
  • How to write a command line utility that accepts arguments and options

This entire course is aimed at beginners, but if you’re familiar with Linux or even other operating systems, you’ll still get something out of the later sections in the course.  At the end of the course, you’ll have your own template script you can use to start creating your own.

You won’t find any slides on this course; it’s all hands-on work that lets you learn as you code.  After the introduction, you’ll start writing a script right away and I’ll explain each line of code, what it does, and why you want it. 

Throughout the course, you will write 20 different scripts:

  • first_script will print text to the screen (created with echo)

  • second_script will print text to the screen (created with `vim`) and uses a shebang

  • debug will run verbosely with extra output

  • debug2 will run verbosely with extra output (`vim` and `chmod` practice)

  • cd will move into a folder and list it’s contents (a pseudo file browser script)

  • vars will assign and prints a variable

  • literal will assign and print a literal variable name

  • cmd_output_vars will save the output of a command in a variable and print it to the screen

  • if will do simple conditional checks

  • rename a broken script that will batch rename files using `if`/`else`/`mv` and more, bu quires you to fix it (debugging practice)

  • lowercase will use a for loop to loop through files in a directory

  • change_extension will change all files of a certain file extension to a new file extension

  • dir_args will accept a directory as an argument passed to it and list only folders it contains

  • version will print a version when the `–version` flag is passed (also practicing global and cal variable scopes)

  • usage will print a help message with `–help` or if no args are passed

  • logging will log to a file in three ways (INFO, WARN, DEBUG) using a log with the same name as the script

  • trap will show a message when you interrupt the script’s execution

  • parse_args will parse for different arguments

  • detect_os will check several operating systems and display the one it detects

  • template will be a starting point you can use for all your future shell scripts

The start of the course is intentionally slow and broken into many small lectures.  This allows you to really understand what’s going on and let you absorb what you’ve learned and then apply it to a real-world example.  In addition to learning shell scripting, you’ll also learn about macOS and Linux in general as this helps you write better scripts. 

I recommend using a Mac for this course because it has everything you need to get started without having to install anything extra.  I’ll also be working on a Mac throughout the course.  But you’ll be able to run all the same scripts from a Linux machine, or even a Windows machine that runs the Windows Subsystem for Linux.  There will be some differences in those cases, but I’ll explain them as we go.

If you’re learning this for work, the first sections can get you up to speed quickly, while the later sections can help you uncover advanced topics you may need for your job. 

If you’re joining the course for your personal life, you can automate some tedious tasks you may do such as renaming files, data entry, finding things, etc.

Who this course is for:

  • People interested in Linux or programming but don’t know where to start
  • People curious about programming that need an easy place to start
  • People who have tried to learn programming but gave up
  • People curious about Linux
  • People curious about automation
  • System admins or engineers
  • Entry level programmers

User Reviews

0.0 out of 5
0
0
0
0
0
Write a review

There are no reviews yet.

Be the first to review “Shell scripting for humans”

×

    Your Email (required)

    Report this page
    Shell scripting for humans
    Shell scripting for humans
    LiveTalent.org
    Logo