Anyway, Sean Kelly was doing some commandline magic in his webcast comparing J2EE with things like Zope and RoR and used something I had never seen before:
You want to rename a folder for example correcting a plural form or something similiar:
mv picture{,s}
This will rename the folder/file "picture" into "pictures". Very handy :D Actually it will simply take the word "picture" and split it up into 2 strings: One without and one with "s" appended. Just try it with something like this:
echo {hello,world}
Absolutely cool, also for creating multiple folders within a shared parent directory ;-)
mkdir /Users/zerok/{hello,world}
After some short checking the Bash reference manual I now know, that this feature is called "brace expansion".
blog comments powered by Disqus