Main index

Introducing UNIX and Linux


Introduction to shells

Overview
Why do we need a shell?
Shell syntax
      Types of shell command
      Simple commands
      Pipelines
      Grouping commands
      Exit status
      List commands
Arithmetic
      Operators and functions
Making decisions
      The 'test' statement
            Operators used by 'test'
      The 'if' statement
Loops
      'For' loops
      'While' and 'until' loops
Searching for files
      Arguments to 'find'
Formatted output
      Arguments to 'printf'
Passing information to scripts
      Scripts with arguments
      Parameter expansion
Summary
Exercises

Summary

The following commands were introduced in this chapter

bc calculator
break exit from for, while or until loop
continue continue for, while or until loop
false returns 'false' value, exit status 1
find find files
printf write formatted output
shift shift positional parameters
test evaluate expression
true returns 'true' value, exit status 0

Copyright © 2002 Mike Joy, Stephen Jarvis and Michael Luck