Course Icon SOLARIS Training

Solaris Advanced Shell Programming Tools

0800 1337 401

Overview

This Solaris Korn Shell Programming training course is designed to give delegates practical experience using a range of Solaris tools to manipulate text and incorporate them into Solaris shell scripts.

Prerequisites

The Solaris Advanced Shell Programming Tools course assumes knowledge of the Solaris Operating System to the level covered in the Solaris Introduction Course. Some shell programming experience to the level covered in Solaris Shell Programming is also necessary.

Objectives

To provide the knowledge and skills to make effective use of a wide range of standard Solaris programming and development tools.

Outline

Course Contents - DAY 1

Course Introduction

  • Administration and Course Materials
  • Course Structure and Agenda
  • Delegate and Trainer Introductions

Session 1: BACKUP AND RESTORE UTILITIES

  • The tar command
  • Compression utilities gzip, bzip2, zip and compress
  • Exercise: Backing up and restoring files using tar
  • Exercises: Compressing files

Session 2: BACKGROUND JOB SCHEDULING

  • Scheduling jobs with the cron command
  • Scheduling jobs with the at command
  • Exercises: Running background jobs

Session 3: COMMANDS FOR COMPARING FILES

  • Compare two files with the cmp command
  • Compare two files with the comm command
  • Compare two files with the diff and sdiff commands
  • Compare large files with the bdiff command
  • Exercises: Identifying file differences

Session 4: SPLITTING FILES

  • The split and csplit commands
  • Exercises: Splitting files

Course Contents - DAY 2

Session 5: IDENTIFYING AND TRANSLATING CHARACTERS

  • od - octal dump
  • Use cat to display non-printing characters
  • The expand and unexpand commands to convert between tab and space characters
  • The tr command for character translation
  • Exercises: Translating characters with tr

Session 6: REGULAR EXPRESSION NOTATION REVIEW

  • Standard regular expressions
  • Extended regular expressions

Session 7: THE STREAM EDITOR - sed

  • sed command line syntax
  • sed command processing
  • Pattern space
  • sed addresses
  • sed commands
  • Hold and get functions
  • Advanced flow control
  • Exercises: Text processing with sed

Session 8: INTRODUCTION TO THE PATTERN SCANNING UTILITY - awk

  • Introduction and command line syntax
  • The awk program structure
  • Operators
  • Simple patterns
  • Extended patterns
  • Special patterns (BEGIN and END)
  • Program variables: Built-in variables, User defined variables, Arrays
  • Mathematical operators
  • Displaying output with print and printf
  • Exercises: Create awk scripts to extract selected data from a file and generate reports

Course Contents - DAY 3

Session 9: awk PROGRAM CONTROL STRUCTURES

  • Program control structures
  • The if construct
  • The while and do ... while constructs
  • The basic for construct
  • Associative array handling
  • Functions: Mathematical and string functions, The system function, The getline function, User defined functions
  • Exercises: Create an awk script using an program control structures and arrays

Session 10: awk DEBUGGING AWK SCRIPTS

  • Responding to Syntax errors
  • Responding to Logical errors

Session 11: MISCELLANEOUS TOOLS

  • bc (calculator)
  • fuser (testing for files in use)
  • getops (checking options passed to shell scripts)
  • printf (formatting screen output)
  • logger (script logging)
  • xargs (generating arguments for a command)
  • eval (re-evaluating variables)
  • Exercises: Using tools within a shell script
See all of the available Technical Courses