Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Get fortunes from thinkgeek.com' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Get fortunes from thinkgeek.com
Authored by: fuerst on Jan 07, '04 06:52:32PM
Another nice thing is this little script to get fortunes from www.thinkgeek.com:

#!/bin/sh
curl -s http://www.thinkgeek.com/fortune.shtml | \
  awk '/#F1F5FB/,/\/p/' | \
  sed 's/<.*>//g' | \
  sed 's/.$//' | \
  sed '/./!d' 
Save it in ~/Applications or ~/bin or where else you collect your scripts and call it via .profile (bash) or .login (tcsh). It needs a Internet connection of course. Original post of this script is here: http://www.macosxhints.com/article.php?story=20030207070436563. I modified it to clean the output from HTML that will sometimes occure.

[ Reply to This | # ]