Brace expansion is one of the interesting features of bash that many users are barely aware of while many others claim is one of their favorite features. The use of braces — { and } — for expanding an expression on the command line can save you a lot of time when you want to generate a lot of commands or strings with very little effort. But you have to first get comfortable with how it works.
One of the simplest examples of brace expansion would be something like this. Say I want to generate a list of numbers that starts with 1 and goes up to my very favorite number — 111. Given brace expansion, this task is incredibly easy.
To read this article in full or to leave a comment, please click here
Source: COMPUTER WORLD