BASH Programming – LNX120 – 3 Days
In this BASH programming training course, students learn to read, write, and debug shell scripts. Shell scripts written by system an database administrators, testers and other Linux programmers help automate commonly used commands, saving time and money for the business.
By learning how to create Linux shell programs and scripts the team becomes more efficient. While some tasks only require small scripts, other tasks may require hundreds of lines of code to accomplish. These larger scripts are created using Linux commands such as find, sed, awk and many more.
BASH Programming – LNX120 – 3 Days Request a Class Date
Students learn to read, write, and debug BASH shell scripts, thus increasing productivity by taking full advantage of the Linux BASH shell.
Course ID: LNX120
Duration: 3 days
Audience: Linux or UNIX users, programmers, and system administrators.
Prerequisites:Fundamentals of Linux or Fundamentals of UNIX
In this BASH programming training course, participants will learn how to create specifically tailored utilities designed to meet their precise needs and increase their overall Linux knowledge and skills.
BASH Programming Training Course Outline
- What is a Process?
- Process Structure
- The ps Utility
- Options to the ps Utility
- Background Commands ()
- Killing Background Processes
- Redirecting the Standard Error
Getting Started
- What is a Shell?
- Running Scripts
- Specifying the Script’s Interpreter
- The PATH Environment Variable
- Sub-shells
Variables
- Shell Variables
- The read Command
- The export Command
- The Shell Environment
- Parameter Expansion
- Command Substitution
The Login Process
- The Login Process
- The System Profile Script
- Your .bash_profile Script
- The . Command
Conditional Statements
- The Exit Status of Commands
- Command Line Examples
- The test Command
- The if-then-else Construct
- The elif Construct
- case Statements
Loops
- The for Loop
- The while Loop
- break and continue
- Reading Lines From Files
- Using Arrays with Loops
- $$ – PID of Shell
- Command-Line Arguments
- $- Number of Arguments
- $* – All Arguments
- The shift Command
- The set Command
- Getting Options
Quoting Mechanisms
- Single vs. Double Quotes
- What is a Here Document?
- Using a Here Document
- Here Document Quoting
- Ignoring Leading Tabs
Functions
- Shell Functions
- Passing Arguments to Functions
- Returning Values from Functions
- Function Declarations
Advanced Programming
- Shell Arithmetic
- The select Statement
- Terminal Independence in Scripts
- The eval Command
Debugging Techniques
- Using echo
- Using Standard Error
- Script Tracing
- Options for Debugging
- Conditional Debugging