Main index

Introducing UNIX and Linux


More on shells

Overview
Simple arithmetic
      Arithmetic expansion
            Operators for arithmetic expansion
      The 'expr' command
Pattern matching
      Patterns
            Examples of patterns
      The case statement
Entering and leaving the shell
More about scripts with options
Symbolic links
Setting up terminals
Conventions used in UNIX file systems
Summary
Exercises

Examples of patterns

[abc] matches a or b or c
[l-z] matches all lower-case letters l to z inclusive
[A-Cb-k] matches upper-case letters A to C and lower-case b to k
[XYa-z] matches X and Y and any lower-case letter
[-a-z] matches any lower-case letter or a hyphen
[!0-9] matches any character that is not a digit

Copyright © 2002 Mike Joy, Stephen Jarvis and Michael Luck