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
Written by James Cuzella
Related protips
3 Responses
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
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#