Edit: This just got marked as a duplicate of a question on calling a Bash command. I daresay anyone familiar with programming should be aware that "calling a Bash command" is vastly different from sucking down a resource by HTTP and sending its output to another program.
Does anyone have sample code showing how to achieve this kind of thing in Ruby:
curl http://stackoverflow.com | wc
I know I could use system
, but would ideally like to keep it pure Ruby using IO.pipe
or whatnot.