Skip to content

Instantly share code, notes, and snippets.

@martinpannier
Created September 22, 2010 09:14
Show Gist options
  • Save martinpannier/591394 to your computer and use it in GitHub Desktop.
Save martinpannier/591394 to your computer and use it in GitHub Desktop.
Thanks to Brian Greenberg (http://briangreenberg.net) for the original code. This code is for use in GeekTool to display a quote, properly formatted from quotesource.
quotesource=http://www.quotedb.com/quote/quote.php?action=random_quote
curl -s ${quotesource} |sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | \
sed -e s/document.write\(\'//g | \
sed -e s/\'\)\;//g | \
sed -e s/\`/\'/g | \
sed 's/More quotes from / – /g'| \
sed '$!N;s/\n/ /'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment