Chapter Syllabus
6.1 How a Command Is Executed
6.2 Position Specifiers
6.3 Meta Characters
6.4 Standard and Extended Regular Expressions
All human languages have idioms and phrases. These are made up of combinations of words not used in their ordinary meanings. Regular expressions can be considered as idioms of the UNIX shell. These are used for string pattern matching in many UNIX commands. As idioms and phrases convey a handful of meanings in few words, regular expressions are also very useful where you need to match complex text patterns and ordinary methods are just not applicable .
Regular expressions consist of strings of characters, position specifiers or anchor characters, and meta characters that have special meanings. Each regular expression is expanded into its meaning before the UNIX shell executes a command containing a regular expression. Before we actually use regular expressions in this chpater, we will start with the command execution process. We will then discuss basic meta characters used in regular expressions. You will learn the use of regular expressions with some simple commands. At the end of the chapter, you will be able to use regular expressions to search and replace character strings in files and in stdin and stdout .
Top |