Last Updated: February 25, 2016
·
2.147K
· trinitronx

Copy lorem ipsum text to clipboard via shell

This one can come in handy if you need to fill in some example text.

To set this up, add the following line to your ~/.bashrc :

alias lipsum="wget -q -O- http://lipsum.com/feed/html | tidy -q -numeric -asxhtml --show-warnings no - | xmlstarlet sel -N xhtml='http://www.w3.org/1999/xhtml' -t --copy-of \"//xhtml:div[@id='lipsum']/*/text()\" -n -b - | xclip -selection clipboard"

Depends: xmlstarlet, htmltidy, xclip

To install dependencies on Ubuntu, you can use:

sudo apt-get install xclip xmlstarlet tidy

3 Responses
Add your response

really cool stuff. Thanks for sharing :)

over 1 year ago ·

@shupal You're welcome!

over 1 year ago ·

This is amazing!

over 1 year ago ·