Course Outline
Introduction
- Objectives
- Course Schedule
- Course Introductions
- Pre-requisites
- Bibliography
- Delegate Responsibilities
- Course Summary
Review of Basics - Optional
- Files
- Directories and Processes
- Displaying Directories - ls
- Getting Help - man
- Displaying Files - cat, more
- Simple Commands
- Piping - using | symbol
- Redirection - using > symbol
- Appending to a File - using >> symbol
- Redirecting Input - using < symbol
- Redirecting Errors
- Using /dev/null for Error Handling
- Foreground Jobs
- Background Jobs - &
- Stopping Jobs - kill
- Special Files - . and ..
- The Command Prompt - PS1
- Creating Aliases
- Using Aliases
- Command History
- Command Line Editing - using Arrow Keys
- Command Line Editing - using vi
- Customizing the Shell for government operations
- The Home Directory - HOME
- The Working Directory - pwd
- Changing Directories - cd
- Creating Directories - mkdir
- Removing Directories - rmdir
- Interactive Copy - cp -i
- Interactive Move - mv -i
- Interactive Remove - rm -i
- Recursively Removing Directories - rm -r
- Wild Cards for File Name Generation
- Word Count - wc
- Finding Files - find
- Finding Text in Files - grep, sort, cut, uniq, tr
- Changing Permissions - chmod
Shell Programming
- Creating Shell Scripts for government tasks
- Testing the Command
- Creating the Script File
- Adding Execute Permissions
- Testing the Script
- Running the Script - time
- Running the Script - dot
- Running the Script - exec
- Running the Script - ksh
- Debugging the Script for government use
- Passing Parameters to Scripts
- The read Command
- Using read in Scripts for user input
- Choosing the Shell for government operations
- Tidying the Output of Scripts
- Suppressing Input - stty
Special Characters and Variables
- Quotation Marks for String Handling
- Quoted Strings - ", '
- Escape Character - *
- Quoted Strings - `
- Using $(...) for Command Substitution
- System Variables - set
- Other Special Variables for government use
- User Variables for customization
- User Variables - unset
- Variables in Scripts for dynamic content
- Typeset Command for variable types
- Integer Variables for calculations
- Special Constructs for advanced scripting
Creating Menus
- Conditions - case for decision-making
- Creating a Menu for user interaction
- Iteration - while, until for looping
- Holding the Output - sleep for timing control
- Holding the Output - dummy read for input handling
- Ending the Script gracefully
- Ending the Loop conditionally
- Hidden Option - forking a shell for background processes
- Trapping Interrupts - trap for error handling
- More on Interrupts for robust scripts
- Highlighting Text - tput for visual feedback
- Positioning the Cursor - backtab \b for precise control
- Korn Shell Menu for enhanced user experience
Selection
- Conditional Testing for logical operations
- Testing File Attributes for file management
- Testing File Permissions for security checks
- Multiple Tests - Nested ifs for complex conditions
- Multiple Tests - elseif for streamlined logic
- The NOT Condition for negation
- Multiple Conditions in One Test for efficient evaluation
- Testing Strings for data validation
- Using Square Brackets for conditional expressions
- Avoiding Null Input for robust scripts
- Testing Numbers for numerical operations
- More on case for advanced pattern matching
- Displaying Variables for transparency
- Placing Spaces for readability
- Testing Commands for execution verification
Iteration, Looping
- Computations - let for arithmetic operations
- Iteration - while, until for repetitive tasks
- Infinite Loop for continuous processes
- Iteration - for for iterating over elements
- More than 9 Parameters - shift for handling large inputs
Sub-scripts and Functions
- Local and Global Variables for scope management
- Sub-scripts for modular coding
- Export Command for variable sharing
- Exit Status for error handling
- Aliases for command shortcuts
- Functions for reusable code blocks
- Useful Functions for common tasks
- Return Status for function results
- Manipulating Functions for dynamic behavior
- Functions in Scripts for enhanced functionality
Advanced Commands
- Debugging - set for script diagnostics
- Setting - set for configuration options
- Merging Files - join for data integration
- Merging Files - paste, basename and dirname for file manipulation
- Job Control - jobs for managing processes
- Regular Expressions for pattern matching
- Global Regular Expression Printer - grep for text search
- Extended Regular Expression grep - egrep for advanced searching
- Fast grep - fgrep for quick searches
- Computations - expr for arithmetic evaluation
- Computations – bc, eval Command for complex calculations
- Argument Processing for input handling
- getopts Command for option parsing
- Using Arrays for data storage and manipulation
Advanced Edit – vi & sed
- vi - Mapping Key Combinations for custom shortcuts
- Mapping Control Keys for enhanced editing
- Using Abbreviations for efficiency
- Editing Many Files simultaneously
- Regular Expressions for pattern-based operations
- Global Insert for batch modifications
- Here document for multi-line input
- Batch Stream Editor - sed, sed delete, -d, sed print, -p, sed suppress, -n, sed quit, -q, sed file, -f, sed Multiple Input, sed for text processing
- Find and Replace for content modification
- sed Example for practical application
Text File Processing - awk
- The awk Programming Tool for data analysis
- Pattern Matching for selective processing
- Regular Expressions for advanced pattern matching
- Comparison Patterns for conditional operations
- Compound Patterns for complex conditions
- Range Patterns for interval-based processing
- Special Patterns for specific scenarios
- Built-in Functions for enhanced functionality
- Troubleshooting awk Scripts for reliability
- Passing Parameters to awk scripts for dynamic input
- Using Contains for substring matching
- printf Function for formatted output
- Computations for arithmetic operations
- Functions for custom logic
- substr for string manipulation
- length for string length determination
- Action Statements for script actions
- Control Flow Statements for logical control
- Arrays for data storage and retrieval
- Arrays with for Loops for iteration
- awk Examples for practical use cases
Requirements
Testimonials (7)
the additional course material is great, and can be used later on; the trainer was engaging throughout sessions, maintained a great energy, helped us a lot in the exercises and was patient, encourage us to keep practicing, shared real productive examples where we would need the samples that were shared during the training hours.
Ionelia
Course - Shell Scripting UNIX/Linux
learning bash
ALIN CRISTIAN
Course - Shell Scripting UNIX/Linux
bash scripting - practice exercises
Ionut D
Course - Shell Scripting UNIX/Linux
Large reach on bash subject.
Catalin Opris
Course - Shell Scripting UNIX/Linux
I liked that we practiced a lot of theory, which is the perfect way to learn new things.
Roxana
Course - Shell Scripting UNIX/Linux
I liked that the trainer adapted to each person and made analogies with real situations
AnaMaria
Course - Shell Scripting UNIX/Linux
Practical approach