when ever I get an opportunity to swings this trick out I get very excited. Say you have a task you wanna do and it’s should be applied to a number of files with a common name or are all with the same extension, basically any situation where you would be doing something that seems too repetitive for you taste.
Too create our example we can actually use the same trick. Lets say you have a number of files with the same name but have different number at the back of it: test_1.txt, test_2.txt, test_3.txt. So instead of doing touch file.txt n number of times you can instead do the following.
$ touch test_{1,2,3}.txt
Now when I was trying to figure out where I learned this from I found the website where it came from so go there for more kewl tricks.
Sorry, comments are closed for this article.