commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for:
There is 1 alternative - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.
what? why?
nice use of bash syntactic sugar though. shortcuts the if statement and backgrounds every execution... did you want all of them running in parallel? At any rate, while I don't see the use case for this, the code does what it claims and demonstrates a few good features of bash syntax.
@author: Perhaps, next time you can provide more details to benefit those who want to understand your code but aren't at the level where it makes sense to them yet.
I can't think of a good reason to ever use this command. It could be very damaging if performed in certain directories. Also, the description is unclear (the commands are not run "on" a directory, and I'd make it clear that the processes will be run in parallel). I don't want to discourage the author from contributing in the future, but I would not recommend this command for general use.
I'm thinking of a reason to use this.
Lets say you create a directory named 'Mission'
and your mission is
1. convert all wav to mp3
2. sort by artist
3. download album covers and attach to directories.
You can create a function to each 1..3 and execute only one script - which sounds better.
But lets say you have those scripts already.One that converts wav to mp3 , one that sorts songs by artists (?) and one that downloads album covers.
You can cp all three files to one directory and execute the command. But there is a problem - you want to determine in which order they will be executed. so you have to call them a,b,c so that 'for i in *' will iterate the right way.
I guess this is not so useful.