I finished my short file for a homework assignment which uses IO.popen("command").readlines to grab the STDOUT of that command. However, I need to write a shell script to wrap my ruby file in. No problem, but somehow putting it in the shell script makes readlines hang.
ruby script.rb foo example > example.out
this works
script.sh foo example >example.out
this hangs on readlines. ruby script.rb
is all that script.sh contains.