In our static assets directory, we have the following directories:
public/images public/javascripts public/stylesheets
We want to namespace our application (my_app). We could type the following:
mkdir public/images/my_app mkdir public/javascripts/my_app mkdir public/stylesheets/my_app
Or to save time, we could type:
mkdir public/{images,javascripts,stylesheets}/my_app
This will create the three directories with one command.
For more information on bash curly brace expansion, checkout this article by Mitch Frazier on Linux Journal.
Another expansion I’ve used:
cp file.txt{,.bak}
cp file.txt file.txt.bak