CHAPTER 9Pattern Matching
Many beginning shell users shy away from learning how to take advantage of patterns in their everyday work, despite the fact that patterns are one of the most powerful features of the shell. Indeed, whatever your level of knowledge, we'd venture to say that you have used them already, perhaps most notably the * wildcard. In this chapter, we'll show you many more patterns along the same lines. Using patterns for file matching is often called globbing by shell programmers. It's a funny word (it's derived from "global," as in global substitution), but it does at least summarize this often-discussed procedure in a single term. We'll use the word to describe the process of generating filenames from patterns.
Note The
Get From Bash to Z Shell: Conquering the Command Line now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.