Open main menu

CDOT Wiki β

Tutorial 10 - Shell Scripting - Part 1

Content under construction

INTRODUCTION TO SHELL SCRIPTING

Main Objectives of this Practice Tutorial

  • Plan and create a Shell Script
  • Explain the purpose of the she-bang line contained at the top of a shell script.
  • Set permissions and execute shell scripts.
  • Use environment and user-defined variables in shell scripts.
  • Use Command Substitution and Math Operations in shell scripts
  • Explain the purpose of the $? exit status and the test command.
  • Use if and if-else logic statements in shell scripts.
  • Use a for loop statement with a list in shell scripts.

Tutorial Reference Material

Course Notes
Linux Command/Shortcut Reference
YouTube Videos
Course Notes:


Shell Scripting

Variables

Commands / Techniques

Control Flow Statements Instructional Videos:

INVESTIGATION 1: CREATING A SHELL SCRIPT

INVESTIGATION 2: USING VARIABLES IN SHELL SCRIPTS

INVESTIGATION 3: COMMAND SUBSTITUTION / MATH OPERATIONS

INVESTIGATION 4: USING CONTROL FLOW STATEMENTS IN SHELL SCRIPTS

LINUX PRACTICE QUESTIONS