Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

LinkedIn Learning

Linux: Bash Shell and Scripts

via LinkedIn Learning

Overview

Prepare for a new career with $100 off Coursera Plus
Gear up for jobs in high-demand fields: data analytics, digital marketing, and more.
Get an introduction to Linux bash scripting. Learn how to read and write Linux bash scripts, complete with local variables, functions, loops, and coprocesses, and use sed and AWK.

Bash scripting can help you automate routine tasks and save valuable time, whether you're a Linux user, sys admin, or software developer. Kevin Dankwardt has written thousands of bash scripts, short and long. Here he teaches you how to read and write scripts, and provides a series of scripting challenges to help you test your new skills. Learn about the bash environment, local variables, functions, loops, case statements, string operations, and coprocesses. Plus, learn how to use the text processing utilities sed and AWK to read and edit data in text files. The topics covered in this course are vital for Linux administration, and required for many Linux certifications.

Syllabus

Introduction
  • Welcome
  • What you should know
  • Using the exercise files
1. Intro to Bash Scripting
  • Exploring the Bash documentation
  • Setting the script interpreter and permissions
  • Time commands and set variables
  • Bash startup
  • Sourcing and aliasing with bash
  • Displaying text with the echo command
  • Challenges: Scripts with exported variables, sourcing, and echo
  • Solutions: Scripts with exported variables, sourcing, and echo
2. Variables, Control Structures, and Arithmetic
  • The typeset and declare commands for variables
  • Looping with for/while sequences and reading input
  • Defining functions and using return and exit
  • Using file descriptors, file redirection, pipes, and here documents
  • Control-flow case statements and if-then-else with the test command
  • Using arithmetic operators
  • Challenges: Using local variables in functions, loops, and arithmetic
  • Solutions: Using local variables in functions, loops, and arithmetic
3. Using Filters and Parameter Expansion
  • Defining filters and using head, tail, and wc
  • Using sed and AWK for more powerful scripting
  • Positional parameters and operators with braces
  • Challenges: Looping, special variable operators, sed, and AWK
  • Solutions: Looping, special variable operators, sed, and AWK
4. Advanced Bash
  • Using the coproc command
  • Debugging scripts with -x and -u options
  • Signals and traps
  • Using the eval and getopt commands
  • Challenges: Debugging scripts using trap, eval, getopt, and coproc
  • Solutions: Debugging scripts using trap, eval, getopt, and coproc
Conclusion
  • Next steps

Taught by

Kevin Dankwardt

Reviews

Start your review of Linux: Bash Shell and Scripts

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.