Course details

Bash Scripting Flow Control and Data Types

Bash Scripting Flow Control and Data Types


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



Overview/Description
In this course, you will learn how to control the flow inside a Bash script using conditions and loops. You will also learn about some of the advanced features and capabilities of strings, numbers, and arrays.

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.4

Lesson Objectives

Bash Scripting Flow Control and Data Types

  • start the course
  • work with conditional statements in Bash scripts and use the built-in test command to evaluate expressions
  • recognize numeric, string, and test comparison operators and create compound conditional statements
  • work with for loops and wildcards
  • use while and until loops to iterate through a list or run until a condition is achieved
  • use break and continue to control the iterations of a loop
  • create a case statement and use it in place of a nested if statement
  • create an array by adding and removing elements and manipulate the data in the array
  • perform simple math operations in a Bash script and use the bc utility to do floating point math
  • create and use a Bash script to convert numbers between different bases
  • manipulate strings using the built-in Bash string manipulation operations
  • use popd, pushd, dirs, pwd, cd, and $DIRSTACK to work with directories and directory structures in a Bash script
  • work with conditional statements, loops, and arrays in Bash scripts and manipulate string and numeric data
  • Course Number:
    os_doss_a02_it_enus

    Expertise Level
    Intermediate