Thank you for sending your enquiry! One of our team members will contact you shortly.
Thank you for sending your booking! One of our team members will contact you shortly.
Course Outline
The simplest script
Choosing the shell (magic number #!, Shebang)
Executing the script
External and built-in commands
Special characters
- Comment (#)
- End of Line (;)
- Null statement (:)
- Input/output redirection (>, <, >>)
- Output redirection
- Input redirection
- Pipe (|)
- Background process execution (&)
Variables and Parameters
- Variable destruction (unset)
- Variables with null values
- Storing results in variables (backticks ``)
- Parameter retrieval ($0, $#,$1, $2, $3...)
- Manual shifting
- Quoting
- Escape character (\)
Regular Expressions
Conditional statements
- The if/then construct
- The if/then/else construct
- Nesting if statements
- The if/elif construct
- Case statements
- Operators
- Logical operators: AND, OR (&&, ||)
- The test command
Completing the script
The exit statement
Utilising the program's exit status in a script ($?)
Tests and Operators
- Text file operators
- File type tests
- File attribute tests
Comparison operators
- Arithmetic comparison using the if command
- Integer comparison operators
- String comparison
- Complex comparisons (AND, OR)
- Nesting comparison operators
- The assignment operator
- Arithmetic operators
- Bitwise operators
- Logical operators
- Numeric constants
Loops
- The for/in loop
- The seq command
- The while loop
- The until loop
- Loop control (break, continue)
Text Processing
- head, tail commands
- Sort, Uniq, Expand, Unexpand
- Cut, Paste, Join, Wc, Tr
Text search (grep)
Stream Editor (sed)
Interactive programs
- read command
- User select
Features
sleep command
Troubleshooting: What if the script fails? (debugging)
Requirements
- Familiarity with basic Linux commands and file system navigation.
- Experience with shell usage and simple text editing on Linux.
- Completion of the "Introduction to Linux" course is recommended, though not mandatory.
Audience
- Linux users aiming to automate tasks through shell scripting.
- System administrators seeking to optimise server management and operations.
- Developers and IT professionals eager to upgrade their Linux programming skills.
14 Hours