Solaris Shell Programming

2 Day Course
Hands On
Code SSPR

Book Now - 2 Delivery Methods Available:

Scheduled Online Onsite

This Sun Microsystems Solaris Korn Shell Programming training course is designed to give delegates practical experience in developing and writing SOLARIS shell scripts. Most of the built-in shell commands are introduced together with the main program control structures. This course is not suitable for C shell programmers.

The delegates will practise:

  • Writing simple scripts to enhance basic command output
  • Using the various shell quoting mechanisms appropriately
  • Manipulating shell variables and user-defined variables in scripts
  • Implementing conditional execution facilities
  • Using the shell's built-in loop constructs where appropriate
  • Writing scripts to trap user interrupts
  • User defined Functions
  • Developing menu-driven shell scripts

Solaris Command Review (6 topics)

  • Basic Unix commands
  • General commands
  • File and directory handling commands
  • Filename generation characters
  • I/O Redirection features
  • Other commands

Getting Started (6 topics)

  • What is a shell script?
  • Development guidelines
  • Creating and editing shell scripts
  • Naming and storing shell scripts
  • Executing shell scripts
  • Exercise: Write a simple shell script

Using Variables (8 topics)

  • Environment variables
  • Local variables
  • Assigning values to variables
  • Assessing variable values
  • Using quotes
  • Delimiting variable names
  • Echo control sequences
  • Exercise: Add variables to a script

Integer Arithmetic (3 topics)

  • Using the expr command
  • Using the (( )) notation
  • Exercise: Add integer arithmetic to a shell script

Handling Run Time Data (4 topics)

  • The read command
  • Command line arguments
  • Exercise: Writing a generic shell script
  • Exercise: Writing an interactive shell script

Condition Execution (6 topics)

  • The if statement
  • The test command
  • Other test notations
  • Default and substitute variables
  • Exit status codes
  • Exercise: Adding validation to previous scripts

Loop Constructs (7 topics)

  • The while loop
  • The until loop
  • The for loop
  • The while true and until false loops
  • Loop control commands
  • Exercise: Enhancing the previously written scripts
  • Exercise: Writing a guess-the-number game

Multi-Branch Decisions (3 topics)

  • The case statement
  • Menu driven applications
  • Exercise: Developing and writing a menu system

Functions (4 topics)

  • What is a function?
  • Syntax
  • Examples
  • Exercise: Add a function to a script

Interrupt Handling (3 topics)

  • Interrupt signals
  • Trapping interrupts
  • Exercise: Adding traps to the menu script

Additional Features and Facilities (6 topics)

  • The exec commands
  • The includes notation
  • More about loops
  • Arrays
  • Here Documents
  • Exercise: Create a here script
The Solaris Shell Programming course assumes knowledge of the SOLARIS Operating System to the level covered in the SOLARIS Introduction Course. Some programming experience may also prove advantageous.

Additional Learning

The courses below may help you meet the knowledge level required to take this course. If you are unsure please ask a training advisor

  • Solaris Introduction

    A 3-day Training Course on Solaris Introduction; Gain a good practical knowledge of the SOLARIS Operating System, command structures & editor facilities.

    course code SI 46 Classroom dates 6 locations
Ask a Question

or call:408-759-5074

Course PDF

Print

Share this Course

+1
Share

Recommend this Course