Advertisement
Guest User

Random OS X Daily Tweet

a guest
Aug 25th, 2010
479
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.27 KB | None | 0 0
  1. function randomosx() {
  2.     LIST_OF_FUN=$(curl --connect-timeout 3 -s http://twitter.com/osxdaily | grep '<span class=\"entry' | sed -e 's/<[^>]*>//g' | sed 's/^[ \t]*//;s/[ \t]*$//' )
  3.     RANDY=`echo $RANDOM%20+1 | bc`  
  4.     echo "$LIST_OF_FUN" | sed -n "${RANDY}p"
  5. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement