Skip to content

Commit

Permalink
Add redirect stderr example.
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrmurach committed Apr 16, 2016
1 parent 9276e8c commit 3bbba48
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/redirect_stderr.rb
@@ -0,0 +1,10 @@
# encoding: utf-8

require 'tty-command'

cmd = TTY::Command.new

out, err = cmd.execute("echo 'hello' 1>& 2")

puts "out: #{out}"
puts "err: #{err}"

0 comments on commit 3bbba48

Please sign in to comment.