Filename Generation

An important feature of most shells is the ability to refer to files by giving a pattern that describes one or more filenames. For example, all the shells discussed in this book use *.c as a pattern describing all filenames that end in .c. The shells expand this pattern into a list of filenames that match the pattern. This process of matching filenames to a pattern is called globbing. Globbing is useful for specifying many files with a single pattern and long filenames with a short string.

Setting the noglob (set –o noglob) option turns off all pattern matching so that you will have to give filenames exactly: *.c will refer only to a file whose name consists of the three-character sequence *, ., and c . See “Filename Generation/Pathname ...

Get A Practical Guide to Red Hat® Linux® 8 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.