start page | rating of books | rating of authors | reviews | copyrights

UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 9.4 Use Wildcards to Create Files? Chapter 9
Saving Time on the Command Line
Next: 9.6 String Editing (Colon) Operators
 

9.5 Build Strings with { }

I've been finding more and more uses for the {} pattern-expansion characters in csh, tcsh, and bash. (Other shells can use {}, too; see article 15.3.) They're similar to *, ?, and [] (15.2), but they don't match filenames the way that *, ?, and [] do. You can give them arbitrary text (not just filenames) to expand - that "expand-anything" ability is what makes them so useful.

Here are some examples to get you thinking:

- JP


Previous: 9.4 Use Wildcards to Create Files? UNIX Power ToolsNext: 9.6 String Editing (Colon) Operators
9.4 Use Wildcards to Create Files? Book Index9.6 String Editing (Colon) Operators

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System