Skip to content

Instantly share code, notes, and snippets.

@matsuu
Created October 29, 2010 12:13
Show Gist options
  • Save matsuu/653434 to your computer and use it in GitHub Desktop.
Save matsuu/653434 to your computer and use it in GitHub Desktop.
#!/bin/sh
username="__USERNAME__"
password="__PASSWORD__"
filter="track=$1"
url="http://stream.twitter.com/1/statuses/filter.json"
curl -s --data-urlencode $filter $url -u$username:$password | perl -CIO -MJSON::Any -ne 'my $j=JSON::Any->new;while(<>){eval{my $t=$j->decode($_);printf("@%-15s: %s\n",$t->{user}->{screen_name},$t->{text}); };}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment