Course Overview

Shell Scripting
5 star rating

Overview

Shell scripting is a powerful, flexible, and portable technique for automating the execution of multiple data processing steps. Shell scripts can be used on any operating system and with almost any software.​ Scripts are files that contain shell commands which may be short or can be very complex. Scripts just make it easier because you can invoke one command to run all of the commands in the script. Here instead of using 8 separate commands you can use one command to execute all of them.knowing about shell scripting is a must for any advanced linux administrator or engineer. In this course, you will take your first steps towards unleashing the power of shell scripting with bash through lectures and hands-on labs. Once you have been introduced to shell scripting, you will begin to see the possibilities it can unlock in your own enterprise.during this course, you will learn how to complete the following tasks:

  • Establish and understand scripting environments
  • Identify and set elemental scripting components
  • Manipulate the execution of scripts

Course Content

Basic Shell Programming

  • Scripting conventions
  • The shebang
  • Execution permissions
  • Using source for script execution
  • Creating (& removing) shell functions
  • Using positional parameters
  • Changing the Internal Field Separator (IFS)
  • Declaring and using local variables (limited scope)
  • Shell string operators
  • Shell pattern matching
  • Command substitution
  • Returning values from functions
  • Understanding BASH return codes

Flow Control

  • test statement & it`s equivalents
  • test combinational logic
  • file tests
  • string tests
  • numeric tests

Decision making in BASH

  • if/else statements
  • for statement
  • case statement
  • select statement
  • while & until statements

Command-Line Options and Variable Typing

  • getopts to parse arguments
  • shift to iterate through arguments
  • declare to type variables
  • performing shell math
  • working with integer variables

Arithmetic Shortcuts

  • arithmetic for loops
  • working with shell arrays

Input/Output Command-Line Processing

  • Using labels to store data
  • Using echo & read commands
  • Using printf
  • Reading information from files
  • Using command, builtin & enable

Process Handling

  • Process ID`s & Job numbers
  • Foreground and background processes
  • Signal handling
  • using traps to catch signals

Implementing Simple Menus with select Dialog Boxes with dialog

  • Yes/No Box(yesno)
  • Message Box(msgbox)
  • Input Box(input box)
  • Text Box(text box)
  • Menu Box(menu)
  • Check List Box(checklist)
  • Radio List Box(radiolist)
  • progress Meter Box(gauge)

Graphical Boxes with Zenity

  • Yes/No Box(yesno)
  • Message Box(msgbox)
  • Input Box(input box)
  • Text Box(text box)
  • Menu Box(menu)
  • Check List Box(checklist)
  • Radio List Box(radiolist)
Pre Requisite

Basic knowledge of computer programming and the Unix command line.
Ideally, attendees will have previously attended the Introduction to Research Computing workshop, Parallel Computing Boot Camp, or Parallel Programming workshop.

Required Exam
Shell Scripting
Duration
hideRegular TrackFast Track
Duration 3 weeks 1 week

Success Stories

Trained 1000+ Students From 10+ Countries

Blog