lynx -source http://www.lipsum.com/feed/xml?amount=3|perl -p -i -e 's/\n/\n\n/g'|sed -n '/<lipsum>/,/<\/lipsum>/p'|sed -e 's/<[^>]*>//g'

Get Lorum Ipsum random text from lorumipsum.com

This will generate 3 paragraphs with random text. Change the 3 to any number.
Sample Output
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam mollis consequat mattis. Aliquam laoreet sem semper dolor hendrerit tempus. Pellentesque convallis porta consectetur. Aliquam erat volutpat. Pellentesque vel purus lorem. Aliquam erat volutpat. Sed eget dui eu ligula aliquam commodo. Pellentesque ac risus urna. Mauris imperdiet porttitor tempor. Integer lacinia imperdiet neque, nec fermentum nisi pretium facilisis. Morbi tempor tincidunt pellentesque. Phasellus ante elit, interdum ut euismod sit amet, sollicitudin vel est. Cras et quam nibh, id ultricies odio. Morbi turpis velit, semper non laoreet vel, fringilla sed diam.

Proin vel diam diam, eget auctor ipsum. Morbi est diam, vehicula a vulputate in, pretium quis nisi. Aliquam blandit odio et diam interdum euismod. Ut mattis pretium diam sed dictum. Curabitur adipiscing libero tellus. Vivamus elementum purus a dui pulvinar at tincidunt urna consequat. Aenean blandit magna eget ligula pellentesque at bibendum arcu gravida. Donec quis velit in dolor convallis viverra. Maecenas accumsan, tortor eu dictum rhoncus, erat est eleifend quam, non aliquam diam ante a risus. Aenean tristique porta viverra. Nam ullamcorper viverra eros, vestibulum facilisis sapien pretium ut. Nunc urna augue, semper sit amet posuere et, ultrices ac ante. Quisque sed tellus orci, quis lacinia orci. Maecenas dui nulla, ornare vitae tristique ut, condimentum a massa. Donec gravida, dolor sed pulvinar egestas, massa ante dapibus lectus, non molestie enim libero vitae elit

5
By: houghi
2010-04-26 17:26:44

1 Alternatives + Submit Alt

  • This fixes the extra lines you get when you request only 1 paragraph using a little bit of grep. Just set p to the number of paragraphs you want. Show Sample Output


    0
    p=1 ; lynx -source http://www.lipsum.com/feed/xml?amount=${p} | grep '<lipsum>' -A$(((p-1))) | perl -p -i -e 's/\n/\n\n/g' | sed -n '/<lipsum>/,/<\/lipsum>/p' | sed -e 's/<[^>]*>//g'
    nublaii · 2012-10-24 14:11:52 0

What Others Think

when you pick 1, it spits out the lorem plus author info from the site
chrismccoy · 335 weeks and 5 days ago
if lynx isn't installed, use 'curl -s' instead.
TuxOtaku · 206 weeks and 4 days 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: