EncartaLabs

POSIX shell programming

( Duration: 5 Days )

The POSIX shell programming training course covers advanced POSIX shell programming for technical users and system administrators. Participants will learn the tools necessary to automate complex tasks and increase productivity.

  • Understand POSIX shell programming and use it to save time with automated scripts
  • Write efficient programs by understanding how shell scripts are processed
  • Customize shell start-up files
  • Easily control your administration tasks

Attend the following course or possess equivalent knowledge:

  • HP-UX and UNIX general users, system and network administrators, and software developers.

COURSE AGENDA

1

Introduction to POSIX shell scripts

  • What is a shell script?
  • Script execution
  • The subprocess environment
  • Shell features
2

Shell scripting

  • Which shell?
  • Recommended shell format
  • Planning to write a shell script
  • Portability issues
3

Variables

  • Variables
  • Displaying and using variables
  • Concatenation and substrings
  • Other sources of data for variables
4

User input

  • Reading user input
  • Positional parameters
  • Creating positional parameters
  • Conditional substitution
  • External influences
5

Designing program output

  • Variable attributes
  • Formatted data
  • Cursor positioning and terminal echo
6

Shell arithmetic

  • Creating Integer-only Variables
  • Base and Others
  • Working with arithmetic operators and data
7

Branching and logic testing

  • Logic testing
  • Conditional operators
  • Multi-way branching and the 'case' statement
8

Shell patterns

  • Basic expressions
  • More complex patterns
  • Pattern combinations
9

Program loops

  • The 'while' loop
  • The 'until' loop
  • The 'for' loop
  • Breaking out of a loop and continuing
  • The 'select' loop
10

The 'getopts' Command

  • Processing arguments
  • The getopts and OPTARG variable
  • The OPTIND variable
11

Array variables

  • Substituting and counting
  • Using integer variables as element numbers
12

Functions and function libraries

  • Displaying current shell functions
  • Declaring and using functions
  • Variable scope
  • Function libraries and recursion
13

Managing input and output

  • File descriptors
  • Reading / writing using file descriptors
  • Redirecting, parameter lists and 'here' documents
  • Creating parameter lists from input lines
14

Traps and signals

  • Common signals
  • The trap and stty commands
15

Regular expressions

  • Regular expressions
  • Metacharacters
  • The grep command
16

Introduction to 'awk'

  • Record processing
  • Pattern matching and relational expressions
  • 'awk' variables
17

Variables, strings and arithmetic operations

  • 'awk' user defined variables
  • Environment variables
  • Arithmetic operations
  • String manipulation
  • Formatted output
  • Command line arguments
18

'awk' flow control

  • Conditional 'if', while and for loops
  • Arrays
  • 'getline', 'next' and 'exit'
  • Processing arrays
  • Associative arrays
19

Stream editing with 'sed'

  • Substituting text
  • Deleting and printing lines
  • Reading and writing files
  • Multiple 'sed' editor functions

Encarta Labs Advantage

  • One Stop Corporate Training Solution Providers for over 4,000 Modules on a variety of subjects
  • All courses are delivered by Industry Veterans
  • Get jumpstarted from newbie to production ready in a matter of few days
  • Trained more than 50,000 Corporate executives across the Globe
  • All our trainings are conducted in workshop mode with more focus on hands-on sessions

View our other course offerings by visiting http://encartalabs.com/course-catalogue-all.php

Contact us for delivering this course as a public/open-house workshop/online training for a group of 10+ candidates.

Top