Tue, 08 Jan 2008
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
Like this post? - Digg Me! | Add to del.icio.us! | reddit this!
Posted: 2008/01/08 21:34 | /languages/bash | Permanent link to this entry | This entry and same date
books
career
codinghorrors
events
geekstuff
justdont
magazines
meta
misctech
movies
nottech
operatingsystems/linux
operatingsystems/linux/debian
operatingsystems/solaris
perl
presentations
programming
python
ruby
security
security/apache
security/tools
serversmells
services/dns
sites
sysadmin
testing
tools/commandline
tools/firefox
tools/gui
tools/network
tools/online
tools/online/greasemonkey
tools/puppet
unixdaemon

