Created
August 18, 2011 23:11
-
-
Save JoshReedSchramm/1155513 to your computer and use it in GitHub Desktop.
Speaking Twitter in Bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl http://twitter.com/search.json?q=%23burningriverdevs | grep -Po '"text":.*?[^\\]",' | sed -e 's/\"text\"://g' | sed -e 's/@burningriverdev//g' | sed -e 's/#burningriverdevs/burning\ river\ devs/g'| sed -e 's/RT\ ://g' | sed -e 's/\\\u201C//g' | say |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can make this perform much better by only spawning one sed process and avoiding opening all those pipes. Unix can be clean too! :)
sed -e 's/one/1/' -e 's/two/2/' -e 's/three/3/'
instead of
sed -e 's/one/1/' | sed -e 's/two/2/' | sed -e 's/three/3/'