Bash Puzzles - Brace Expansion
There is nothing like other peoples code to highlight all those little gaps in your knowledge of a programming language. I know what the first one does:
$ mkdir -p {projectone_,projecttwo_,projectthree_}log
$ ls -1
projectone_log
projectthree_log
projecttwo_log
And I was a confident (and a little bit happy) about knowing what the second one does:
$ mkdir -p {project_one,}log
$ ls -1
log
project_onelog
But I had no clue about this one. And my guess (that it would be treated as a single element and expand to ‘projectone_log’) was very wrong:
$ mkdir -p {projectone_}log