Skip to content

Instantly share code, notes, and snippets.

@tsnow
Created September 25, 2012 15:45
Show Gist options
  • Save tsnow/3782682 to your computer and use it in GitHub Desktop.
Save tsnow/3782682 to your computer and use it in GitHub Desktop.
counting twitter terms / Counting via stream in perl
#!/bin/sh
# from: http://blog.isaach.com/2011/12/littlest-twitter-term-counter.html
curl -d "track=$TERM" -u$USERNAME:$PASSWORD -s -o - \
https://stream.twitter.com/1/statuses/filter.json \
| perl -e '$|++; while (<>) {m/\{/ and $i++ and print qq{\r$i}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment