Course Details
 Bash Shell Scripting

Shell Scripting Course is specifically designed to develop skills required for   automation on Unix / Linux Environment. This course focuses on the basic and intermediate level of Scripting. It provides training with hands on session to administer the UNIX shell.

 

Suitable for:

  • Linux Administrators
  • UNIX programmers
  • Database (Oracle/Sybase)developers working on UNIX platforms
  • Database (Oracle/Sybase)Administrators

Prerequisites :

  • Knowledge in Unix / Linux Platform
  • Basic Knowledge in Shell Commands
  • Any Programming language

 

Course Contents:

 

  • 1. Shell Variables

o        User defined variables

o        How to assign value to a variable

o        Rules for Naming variable name

o        How to access the value of variable

o        Variables are not declared

 

o        How to capture output of a command in a variable

 

o        Arithmetic on variables

 

  • Writing and debugging scripts

 

o        Creating and running a script

o        Script basics

o        Debugging Bash scripts

 

  • The Bash environment

o        Shell initialization files

o        Variables

o        Quoting characters

o        Shell expansion

o        Aliases

o        More Bash options

 

  • Regular expression
    • Regular expression
    • Examples using grep
    • Pattern matching using Bash features

  

  • Important Shell Utilities

o        cut

o        sed, tr

o        find

o        sort

o        grep, egrep, fgrep

o        awk

 

 

  • Conditional statements

 

o        Introduction to “if”

o        More advanced “if” usage

o        Using case statements

 

  • Writing interactive scripts

 

o        Displaying user messages

o        Catching user input

 

  • Repetitive tasks

·         The for loop

·         The while loop

·         The until loop

·         I/O redirection and loops

·         Break and continue

·         Making menus with the select built –in

·         The shift built in

 

  • More on variables

o        Types of variables

o        Array variables

o        Operation on variables

 

  • Function

o        Introduction

o        Examples of function in scripts

o        Passing arguments to functions

o        Scope of variable in functions - local & global

 

  • Catching signals 

o        Signals

o        Traps

 

Fill up this form and we will contact you with all the details
 
 
If you want to join our bash shell scripting course, just fill up this form and we will contact you with all the details.


Interview Questions for Shell Scripting

 




 
Sample of Bash Shell Script/td>
 
#!/bin/bash -x 
# poem.sh: Pretty-prints one 
# of the ABS Guide author's favorite
# poems 

# Lines of the poem (single stanza). 
Line[1]="I do not know which to prefer," 
Line[2]="The beauty of inflections" 
Line[3]="Or the beauty of innuendoes," Line[4]="The blackbird whistling" 
Line[5]="Or just after." 

# Note that quoting permits embedding # whitespace. 


# Attribution. 
Attrib[1]=" Wallace Stevens" 
Attrib[2]="\"Thirteen Ways of Looking at a BlackBird\"" 

# This poem is in the Public 
# Domain (copyright expired). 

echo tput bold # Bold print. 

for index in 1 2 3 4 5 # Five lines. 
do 
    printf " %s\n" "${Line[index]}" 
done 

for index in 1 2 # Two attribution lines. do 
    printf " %s\n" "${Attrib[index]}" done 

tput sgr0 # Reset terminal. 
              # See 'tput' docs. 

echo 
exit 0  # Return SUCCESS to the
          # calling program.
          # Check $? 

# Exercise: 
# -------- 
# Modify this script to pretty-print a 
# poem from a text data file

Home   |  Courses   |  Batch Info   |  Exam Dates   |  Contact Us  |
Copyright ©2013 Focus Training Services. All rights reserved