For a paper I was submitting I wanted to create a directory to store each figure I created, so wanted to create a series of directories named Fig_1
through to Fig_8
. Which can be done like this:
Which will create directories called 1,2,3,4,5,6,7 and 8. But if we want to add an identifier we can use:
Which produces the required directories for my figures. This method also works with sequences of letters, so if we wanted to create a directory for each letter of the alphabet:
This technique is called brace expansion, and is implemented in most flavors of bash. More information can be found at this stack overflow question and these man pages.