Skip to content

Instantly share code, notes, and snippets.

@spudtrooper
Created February 21, 2014 13:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spudtrooper/9133891 to your computer and use it in GitHub Desktop.
Save spudtrooper/9133891 to your computer and use it in GitHub Desktop.
Prints a user's twitter stream using cowsay.
#!/bin/sh
#
# Prints a user's twitter stream using cowsay.
#
# Usage:
#
# % twittercowsay <user>
#
# http://jeffpalm.com/twitterer
#
user=$1; shift
if [[ x = x$user ]]; then
echo "Usage $0 user"
exit 1
fi
lines=$(curl -s http://jeffpalm.com/twitterer/twitterlines.php?u=$user)
IFS=$'\n'
for line in $lines; do
clear
cowsay $line
sleep $(( ${#line} / 10 ))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment