Created
November 6, 2009 07:05
-
-
Save axgle/227787 to your computer and use it in GitHub Desktop.
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
#mkfifo mm | |
#ruby p.rb & | |
#echo 1 > mm | |
total=0 | |
while(true) | |
d=IO.read('mm') | |
total+=d.to_i | |
p [total] | |
exit if d=~/exit/ | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment