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
Selecting the shell (magic number #!, Sha-bang)
Invoking the script
External and built-in commands
Notable special characters
- Comments (#)
- End of line (;)
- Empty statements (:)
- Input/output redirection (>, <, >>)
- Output redirection
- Input redirection
- Piping streams (|)
- Running processes in the background (&)
Variables and Parameters
- Removing variables (unset)
- Handling variables with null values
- Storing results in variables (backquotes ``)
- Accessing parameters ($ 0, $ #, $ 1, $ 2, $ 3 ...)
- Manual shifting
- Quoting mechanisms.
- Escape characters (\)
Regular Expressions
Conditional logic
- If / then structures
- If / then / else structures
- Nested if statements
- If / elif structures
- Case statements
- Comparison operators
- Logical and/or operators (&&, | |)
- The test command
Script completion
The exit statement
Leveraging program completion status within a script ($?)
Testing and Operators
- Text file operators
- Determining file types
- Checking file attributes
Comparison Operators
- Arithmetic comparisons using the if command
- Integer comparison operators
- String comparisons
- Complex logic (and, or)
- Nesting comparison operators
- Assignment operators
- Arithmetic operators
- Bitwise operators
- Logical operators
- Numeric constants
Loops
- For / in loops
- The seq command
- While loops
- Until loops
- Loop control (break, continue)
Text Processing
- head and tail commands
- Sort, Uniq, Expand, and Unexpand
- Cut, Paste, Join, Wc, and Tr
Text searching (grep)
Stream editing (sed)
Interactive programs
- The Read command
- User selection
Advanced features
The Sleep command
Troubleshooting non-functional scripts (debugging)
Requirements
- Familiarity with fundamental Linux commands and file system navigation
- Practical experience using the shell and basic text editing tools in Linux
- Completion of the 'Introduction to Linux' course is advised but not mandatory
Intended Participants
- Linux users aiming to automate workflows through shell scripting
- System administrators focused on improving server management and operational efficiency
- Developers and IT professionals looking to refine their Linux programming proficiency
14 Hours