Linux: Bash Shell and Scripts
2h 46mBeginner2016-09-16
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
Exploring the Bash documentation
Setting the script interpreter and permissions
Sourcing and aliasing with bash
Displaying text with echo
Using the typeset and declare commands for variables
Looping
Reading input
Defining functions
Using operators
Using filters and parameter expansion
Advanced bash scripting techniques
Learning objectives
Exploring the Bash documentation
Setting the script interpreter and permissions
Sourcing and aliasing with bash
Displaying text with echo
Using the typeset and declare commands for variables
Looping
Reading input
Defining functions
Using operators
Using filters and parameter expansion
Advanced bash scripting techniques
Skills covered
IT AutomationLinuxNetwork AdministrationNetwork and System AdministrationOpen SourceDeep Dive (X:Y)
Concepts
0. Introduction
- 01 - Welcome
- 02 - What you should know
- 03 - Using the exercise files
1. Intro to Bash Scripting
- 04 - Exploring the Bash documentation
- 05 - Setting the script interpreter and permissions
- 06 - Time commands and set variables
- 07 - Bash startup
- 08 - Sourcing and aliasing with bash
- 09 - Displaying text with the echo command
- 10 - Challenges - Scripts with exported variables, sourcing, and echo
- 11 - Solutions - Scripts with exported variables, sourcing, and echo
2. Variables, Control Structures, and Arithmetic
- 12 - The typeset and declare commands for variables
- 13 - Looping with for while sequences and reading input
- 14 - Defining functions and using return and exit
- 15 - Using file descriptors, file redirection, pipes, and here documents
- 16 - Control-flow case statements and if-then-else with the test command
- 17 - Using arithmetic operators
- 18 - Challenges - Using local variables in functions, loops, and arithmetic
- 19 - Solutions - Using local variables in functions, loops, and arithmetic
3. Using Filters and Parameter Expansion
- 20 - Defining filters and using head, tail, and wc
- 21 - Using sed and AWK for more powerful scripting
- 22 - Positional parameters and operators with braces
- 23 - Challenges - Looping, special variable operators, sed, and AWK
- 24 - Solutions - Looping, special variable operators, sed, and AWK
4. Advanced Bash
- 25 - Using the coproc command
- 26 - Debugging scripts with -x and -u options
- 27 - Signals and traps
- 28 - Using the eval and getopt commands
- 29 - Challenges - Debugging scripts using trap, eval, getopt, and coproc
- 30 - Solutions - Debugging scripts using trap, eval, getopt, and coproc
Conclusion
- 31 - Next steps
Related courses
- Linux Bash Shells and Scripts: Streamlining Tasks and Enhancing Workflows with Automation
- Application Security Testing and Debugging
- Linux System Engineer: Bash Shell Scripting for Automation
- Learning Bash Scripting
- Advanced Linux Shell Scripting
- Cloud Native Platform Engineering by Pearson
- Complete Guide to Penetration Testing
- Ubuntu Linux: Essential Commands and System Administration
Related learn paths
- Explore a Career in Computer Forensics
- Ubuntu Linux Professional Certificate
- The Top Skills IT Professionals Have Right Now
- Become a Penetration Tester
- Prepare for the CompTIA PenTest+ (PT0-001) Exam
- Penetration Testing Professional Certificate
- Getting Started with Linux
- Prepare for the AWS Certified Security - Specialty (SCS-C02) Certification