Bash Advanced Scripting and File I/O


Overview/Description
Target Audience
Prerequisites
Expected Duration
Lesson Objectives
Course Number
Expertise Level



Overview/Description
In this course, you will learn about some of the advanced features of Bash scripts, including how to handle interrupts and signals, parse output from external commands, display progress indicators, and read and edit files.

Target Audience
System administrators, DevOPS, software developers, and users who may need to create scripts to automate processes in a Linux or Linux-like environment

Prerequisites
None

Expected Duration (hours)
1.2

Lesson Objectives

Bash Advanced Scripting and File I/O

  • start the course
  • catch signals or interrupts using traps in a Bash script to allow the script to exit gracefully or handle the interruption
  • create generated strings using brace expansion and use eval to execute strings as commands
  • use default values for input and work with undefined variables
  • create recursive functions and scripts to solve repetitive problems
  • use brace expansion to create, combine, and nest ranges, and create padded numeric values using zero padding
  • execute commands for other scripts and then use the output
  • create and implement progress indicators in a Bash script to show an activity or an estimate of when an activity should end
  • create a dynamic script inside a script and then execute that script
  • send a dynamically generated e-mail from a Bash script using built-in mail tools and commands
  • use mapfile to read data from a file into an array for further processing
  • edit file contents from within a Bash script by using the stream editor (sed)
  • use simple awk statements to extract data from a file or from the output of another command or script
  • create scripts that can trap signals and exit gracefully, display progress bar indicators, and read and modify data from a configuration file
  • Course Number:
    os_doss_a03_it_enus

    Expertise Level
    Intermediate