Linux DevCenter    
 Published on Linux DevCenter (
 See this if you're having trouble printing code examples

Unix Power Tools
Build Strings with { }

by Jerry Peek

I've been finding more and more uses for the {} pattern-expansion characters in csh, tcsh, and bash. They're similar to *, ?, and [], 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:

Back More Unix Power Tools


Copyright © 2009 O'Reilly Media, Inc.