Introduction to Bash Scripting


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



Overview/Description
Learn the basics of BASH scripting! Bash is a concise scripting language that is used on Unix, Linux, and older versions of Windows and Apple Macs. During this course you will learn to create, execute, document, and comment a Bash script. See how to pass and use arguments; access, display, redirect, get input and output, and return results. Then learn to control and manipulate constants as well as running scripts. See how to create, manipulate, use, and export variables. Study ways to control variable scope, define environmental variables, and set string data output. Conclude by creating and use your own library of functions.

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

Lesson Objectives

Introduction to Bash Scripting

  • start the course
  • create, execute, document, and comment in a Bash script
  • use read and echo to get user input and display script output, and recall how to return results at the end of the script
  • work with variables configured in the environment within a Bash script
  • access and use parameters passed in from the command line to a Bash script
  • use input and output redirection to send the output to a device, stdout, and stderr
  • use command line tools and key presses to control and manipulate scripts
  • work with Bash's built-in variables to get data about the script and the environment
  • create, use, and manipulate variables within a script
  • create constants, control and understand variable scope, and export variables
  • use escaping and printf to control how variables and string data are displayed
  • create and use functions within a Bash script, creating a library of functions that can be used in another script
  • use parameters to pass data to a function and add return codes to get the status or result from a function
  • create, use, and run Bash scripts that can manipulate variables, return results from the environment, and use functions
  • Course Number:
    os_doss_a01_it_enus

    Expertise Level
    Intermediate