About the course:
Our Linux Shell Scripting with Bash training course will give you practical experience of writing and debugging increasingly complex scripts to automate tasks and make your life with Linux easier.
This is a hands-on workshop course that will take you through the key aspects of the Bash shell exploring the benefits of writing scripts. Together we'll explore administrative tasks and automation and because it's a Bring Your Own Device course, you'll be able to take away a wealth of useful time-saving tools and techniques.
What you will learn
- Understand the structure of a shell environment
- Learn the key features of bash scripting
- Carry out arithmetic within a shell script
- Creatate interactive scripts
- Incorporate decision-making and flow-control functionality
- Understand and use functions
Who should attend
System / Network administrators and support people, programmers and
prospective Linux power users, looking to harness the power of task
automation through shell scripting.
Prerequisites
Attendance of our Introduction to Linux training or equivalent experience (especially with vim).
Live, instructor-led online and on-site training
We appreciate that you need flexibility to fit in with new working situations - whether you're an individual, part of a distributed team, or simply have projects and deadlines to meet.
Our remote training can take place online in a virtual classroom, with content split into modules to accommodate your scheduling challenges and meet your learning goals. Get in touch today to find out how we can help design a cost-effective, flexible training solution.
As soon as it's safe, we'll return to also offering the on-site custom training courses and programmes upon which we've built our reputation.
Syllabus
Introduction to bash
Refresher of the basics
- The command structure
- Here documents
-
Job Control
The bash Environment
- Environment Variables
- Using Command History
-
Bash Variables
Creating and executing bash scripts
Processing command-line parameters
- Standard command line flags and options
Commenting your scripts
Statements
- The read statement
- Conditional statements (if, case and select)
- The test, [ ... ] and commands
- The let and (( … )) command
- The exit, break and continue statements
Operators
- Testing strings and numbers
- The declare command
- Creating loops (for, while and until)
Arrays
- Declare simple bash array
- Handling arrays
Options and Arguments
Functions
- When and how to use a Function
Using the “trap” command