O'Reilly logo

From Bash to Z Shell: Conquering the Command Line by Peter Stephenson, Jerry Peek, Oliver Kiddle

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required