shell scripting done in Ruby - yay