Get all these commands in a text file with description.

for x in `jot - 0 2400 25`; do curl "http://www.commandlinefu.com/commands/browse/sort-by-votes/plaintext/$x" ; done > commandlinefu.txt
I tried out on my Mac, jot to generate sequence ( 0,25,50,..), you can use 'seq' if it is linux to generate numbers, need curl installed on the machine, then it rocks. @Satya
Sample Output
$ for x in `jot - 0 2400 25`; do curl "http://www.commandlinefu.com/commands/browse/sort-by-votes/plaintext/$x"  ; done > commandlinefu.txt
# commandlinefu.com by David Winterbottom

# Serve current directory tree at http://$HOSTNAME:8000/
python -m SimpleHTTPServer

# change to the previous working directory
cd -

# Save a file you edited in vim without the needed permissions
:w !sudo tee %

# Runs previous command but replacing
^foo^bar
.
.
.

12
By: satyavvd
2009-07-23 12:04:02

What Others Think

instead of jot, u can use seq
linuxswords · 859 weeks and 4 days ago
Nice work , most of have would not have read the site API ;)
hemanth · 859 weeks and 3 days ago
Nice work , most of them would not have read the site API ;)
hemanth · 859 weeks and 3 days ago
How does it work with "seq"? I don't have jot installed.
Neo23x0 · 859 weeks and 2 days ago
And now we all hammer the tar out of the API. :)
jbroome · 858 weeks and 1 day ago
It's really inconsiderate to hammer a site as quickly as you can; please don't do that. I suggest inserting "sleep 15; "
ger · 858 weeks ago
You can also use c-style for loops in bash: for (( x=0; x<=2400; x+=25 )); do sleep 15; curl ...
dennisw · 853 weeks and 5 days ago
Jeepers - I might have to put some capping on the API requests. Yes, a few selected "sleep" commands would be appreciated.
root · 853 weeks ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. 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.

Share Your Commands



Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: