Learning Bash Scripting (2022)

Learning Bash Scripting (2022)

2h 26mBeginner2022-11-09

Authors

Scott Simpson

Scott Simpson

Creating Technology Courses as a Senior Staff Author at LinkedIn

Course details

Bash is a popular command line interpreter and the default option on Linux. In this course, Scott Simpson guides you through using Bash. Scott covers the history and significance of Bash, as well as the basics of using it. He explains how to create a script, make it executable, and run it. Scott steps through programming tasks, dives into Bash control structures, and highlights how to interact with the user. Plus, he shows you how to troubleshoot your scripts.

Skills covered

BashIT AutomationLearningNetwork and System AdministrationOpen Source

Concepts

Introduction

  • Learning Bash scripting
  • Introducing GitHub Codespaces
  • Using GitHub Codespaces with this course
  • Using Bash in GitHub Codespaces

Using Bash

  • What's Bash
  • Pipes and redirections
  • Bash built-ins and other commands
  • Brackets and braces in Bash
  • Bash expansions and substitutions
  • Brace expansion
  • Parameter expansion
  • Command substitution
  • Arithmetic expansion

Programming with Bash

  • Understanding Bash script syntax
  • Choosing a text editor for Bash scripting
  • Displaying text with echo
  • Working with variables
  • Working with numbers
  • Comparing values with test
  • Comparing values with extended test
  • Formatting and styling text output
  • Formatting output with printf
  • Working with arrays
  • Challenge - Make a script that generates a system report
  • Solution - Make a script that generates a system report

Bash Control Structures

  • Conditional statements with the if keyword
  • Working with while and until loops
  • Introducing for loops
  • Selecting behavior using case
  • Using functions
  • Reading and writing text files
  • Challenge - Build a script using control structures
  • Solution - Build a script using control structures

Interacting with the User

  • Working with arguments
  • Working with options
  • Getting input during execution
  • Ensuring a response
  • Challenge - Make a script that uses input
  • Solution - Make a script that uses input

Bash in the Real World

  • Troubleshooting
  • Ensuring script portability

Conclusion

  • Next steps
80,000 Toman