Linux Bash Shells and Scripts: Streamlining Tasks and Enhancing Workflows with Automation
2h 34mIntermediate2025-05-30
Authors

Kevin Dankwardt
Linux Leader, Embedded Linux Authority
Course details
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.
Learning objectives
Explain appropriate usage of shell scripts.
Use the Bash shell effectively.
Use Bash shell variables and control statements.
Automate a wide variety of command line scenarios.
Use shell parameters, functions, pipelines, and file redirection to write powerful command lines and scripts.
Learning objectives
Explain appropriate usage of shell scripts.
Use the Bash shell effectively.
Use Bash shell variables and control statements.
Automate a wide variety of command line scenarios.
Use shell parameters, functions, pipelines, and file redirection to write powerful command lines and scripts.
Skills covered
Business AnalysisIT AutomationLinuxOperations ManagementProject ManagementNetwork and System AdministrationBusiness Analysis and StrategyOpen SourceDeep Dive (X:Y)
Concepts
0. Introduction
- 01 - The path to Bash shell mastery
- 02 - What you should know
1. Intro to Bash Scripting
- 03 - Exploring the Bash documentation
- 04 - Setting the script interpreter and permissions
- 05 - Date and time commands
- 06 - Shell variables
- 07 - Bash startup
- 08 - Sourcing and aliasing with Bash
- 09 - Displaying text with the echo command
- 10 - Challenge - Exported variables, sourcing, and echo
- 11 - Solution - Exported variables, sourcing, and echo
2. Variables, Control Structures, and Arithmetic
- 12 - The typeset and declare commands for variables and arrays
- 13 - Looping with while sequences and reading input
- 14 - Looping with for, the seq command, and backticks
- 15 - Defining functions and using return and exit
- 16 - Using file descriptors, file redirection, and pipes
- 17 - Here documents
- 18 - Open and close file descriptors
- 19 - Control-flow if-then-else with the test command
- 20 - Case statements
- 21 - Using arithmetic operators
- 22 - Challenge - Variables in functions, loops, and arithmetic
- 23 - Solution - Variables in functions, loops, and arithmetic
3. Using Filters and Parameter Expansion
- 24 - Defining filters and using head, tail, and wc
- 25 - The use of sed for powerful scripting
- 26 - Using AWK
- 27 - Positional parameters and curly braces for variables
- 28 - Shell parameter expansion
- 29 - Challenge - Looping and special variable operators
- 30 - Solution - Looping and special variable operators
- 31 - Challenge - sed and AWK
- 32 - Solution - sed and AWK
4. Advanced Bash
- 33 - Using the coproc command
- 34 - Debugging scripts with -x and -u options
- 35 - Signals and traps
- 36 - Using the eval and getopt commands
- 37 - Challenge - Debugging scripts and using trap and eval
- 38 - Solution - Debugging scripts and using trap and eval
- 39 - Challenge - getopt, trap, and coproc
- 40 - Solution - getopt, trap, and coproc
Conclusion
- 41 - Next steps
Related courses
- Linux: Bash Shell and Scripts
- Application Security Testing and Debugging
- Linux System Engineer: Bash Shell Scripting for Automation
- Learning Bash Scripting
- Advanced Linux Shell Scripting
- Complete Guide to Penetration Testing
- Ubuntu Linux: Essential Commands and System Administration
- Learning Linux Command Line (2021)
Related learn paths
- The Top Skills IT Professionals Have Right Now
- Explore a Career in Computer Forensics
- Getting Started with Linux
- Become a Penetration Tester
- Penetration Testing Professional Certificate
- Ubuntu Linux Professional Certificate
- Prepare for the CompTIA PenTest+ (PT0-001) Exam
- Prepare for the AWS Certified Security - Specialty (SCS-C02) Certification