Skip to content

Instantly share code, notes, and snippets.

@axgle
Created November 6, 2009 07:05
Show Gist options
  • Save axgle/227787 to your computer and use it in GitHub Desktop.
Save axgle/227787 to your computer and use it in GitHub Desktop.
#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