Skip to content

Instantly share code, notes, and snippets.

@zefer
Created January 26, 2011 15:12
Show Gist options
  • Save zefer/796808 to your computer and use it in GitHub Desktop.
Save zefer/796808 to your computer and use it in GitHub Desktop.
queries last.fm and returns the currently playing song
#!/bin/bash
LASTFMUSER=${1:-"default_user_name"}
echo $LASTFMUSER ...
curl -s http://www.last.fm/user/$LASTFMUSER | grep -A 1 subjectCell | sed -e 's#<[^>]*>##g' | head -n2 | tail -n1 | sed 's/^[[:space:]]*//g' | cowsay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment