Similarly, by using the < character instead of the > character you can redirect any input a Ruby script may read from the keyboard to read from a .txt file. It's helpful to think of these two characters as funnels; you're funneling output to files and input from files.
C:\scripts>ruby example.rb <input.txt

