Microsoft training courses, Cisco training courses, Prince2 training courses, ISEB training courses with locations nationwide
Call now to speak to an experienced Training Advisor
 
     
 
         
 
 
Thousands of Microsoft, ISEB, ITIL, Cisco and Prince2 Training Courses and more
 
 

Shell Scripting: Hands-On

Course Code: 434      Days: 3
Show all Unix Courses
Scheduled Dates
Locations filtered. Show all UK course locations.
Request availability or book by selecting a date:
Central London
City
London (NW1) 11/02/09 £ 1,435
London (NW1) 13/05/09 £ 1,435
Prices exclude VAT.
Have questions or need a better city/date? Ask now.
On-site/international quote? Ask now.

Course Overview

KornShell ( ksh ) and Bash have evolved into full-featured programming languages with efficient built-in constructs that can handle tasks traditionally solved using grep , sed and awk. This hands-on course provides the skills you need to write reusable, robust shell scripts to extend the user environment and automate complex administrative tasks.

Audience

Administrators, developers and other professionals using shell programming for improved productivity. Knowledge of UNIX or Linux at the level of Course 428, " UNIX Comprehensive Introduction, " or Course 143, " Linux Comprehensive Introduction, " is assumed.

Skills Gained

  • Write Bash and KornShell scripts for improved productivity
  • Integrate all key language features: variables, pattern matching, arrays, branches, loops, I/O and functions
  • Improve efficiency by performing complex file handling and string manipulations without external tools
  • Launch and control additional processes using shell scripts
  • Customize and extend the user environment login scripts
  • Wrap external file and text handling tools within scripts

Course Outline

Introduction and Overview

  • Role of shell scripting
  • Benefits of KornShell and bash vs. other shells
  • Differences and similarities between bash, ksh88 and ksh93
  • Integrating scripts with external tools: grep , sed , awk and others
  • Customising the login environment

Bash and Kornshell Scripting Fundamentals

Shell script elements

  • Commands and comments
  • Defining exit values

Conditional program execution

  • Applying if and case statements
  • Simplifying if logic with elif

Program loops and iteration

  • Conditional looping with while and until
  • Listing for loops

Testing files and directories

  • Analysing attributes
  • Checking file size and contents

Strings and patterns using [[ ]]

  • Comparing strings
  • Verifying the existence of a string
  • Pattern matching and special characters

Debugging

  • Redirecting standard error
  • set commands for debugging

Storing and Accessing Data

Positional parameters

  • Passing and accessing parameters
  • Setting and unsetting parameters
  • Manipulating parameters as groups

Shell variables

  • Defining environment and local variables
  • Specifying default values and error conditions

Arrays

  • Creating and indexing arrays
  • Processing array contents with special variables

Processing Data

Manipulating strings

  • Extracting substrings
  • Determining string length
  • Find and replace

Mathematics

  • Arithmetic for and while loops
  • Writing mathematical expressions: (( )) , $(( )) and let

Modular Programming with Functions

Function basics

  • Functions vs. scripts
  • Parameters and variables

Creating a function library

  • Finding your library with PATH
  • dot . commands

Interacting with the Outside World

Manipulating files and redirecting data

  • Scripting file and directory management
  • Deciphering redirection order
  • Unraveling the secrets of exec : opening and closing multiple files

Interacting with running processes

  • Handling errors
  • Defining post-termination actions such as notification, cleanup
  • Handling and sending signals: trap and kill

Accessing network servers

  • Connecting to a network server
  • Exchanging data with a network server

Creating "Production Quality" Scripts

Ensuring environmental control

  • Checking and modifying environment variables
  • Using getopts to process command line options

Handling user interactions

  • Setting up error processing
  • Employing select to create a menu interface
  • Processing keyboard input


How to make a booking for the 434 course

 
  CourseMonster books thousands of public training courses, classes and boot camps both in London and throughout the UK including: Berkshire, Birmingham, Bristol, Bournemouth, Bucks, Cambridge, Derby, Devon, Edinburgh, Glasgow, Hampshire, Ipswich, Leeds, Leicester, Luton, Manchester, Middlesex, Milton Keynes, Norfolk, Nottingham, Reading, Surrey, Sussex, Tyne and Wear, Midlands and Yorkshire. Topics range from software to administration and development.  
     
CourseMonster® Patent Pending © SeaKom, All Rights Reserved - Channel partners with Business Training Partnership