Using Brace Expansion

The ultimate labor-saving trick at the command-line is brace expansion.

Put simply, anything within braces ({}) is substituted within the specified filename. The following will create new directories called PhotosGermany, PhotosEngland, and PhotosSpain: mkdir Photos{Germany,England,Spain}

In other words, the mkdir command takes the word Photos and combines it with Germany, England, and Spain, creating three new directories.

If you also wanted to create a directory called Photos, with no country after it, you could do so via brace expansion by specifying a comma with nothing before it. Here’s a repeat of the same command with this in place, followed by a file listing showing the results:
mkdir Photos{,Germany,England,Spain}

A numeric or alphabetic range of expansions can be specified by using two dots (..). You will have observed that this is different from wildcards, where the dash is used to indicate a range. The following will create directories called PhotosA, PhotosB, PhotosC, and so on, all the way to Z:
mkdir Photos{A..Z}

For any query or issue, feel free to discuss on