Skip to content

Instantly share code, notes, and snippets.

craig@zuu 1 ruby-1.9.3-p194 ~$ cat ./example.rb
STDOUT.puts "STDOUT"
STDERR.puts "STDERR"
craig@zuu 0 ruby-1.9.3-p194 ~$ ruby ./example.rb 2>&1 1>example.out
STDERR
craig@zuu 0 ruby-1.9.3-p194 ~$ cat example.out
STDOUT