Skip to content

Commit

Permalink
Add exmple to redirection section
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrmurach committed Jul 22, 2017
1 parent 4becff1 commit 47af629
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -322,6 +322,12 @@ cmd.run(:ls, :out => ['log', 'w', 0600])
cmd.run(:ls, :out => ['log', File::WRONLY|File::EXCL|File::CREAT, 0600])
```

You can, for example, read data from one source and output to another:

```ruby
cmd.run("cat", :in => "Gemfile", :out => 'gemfile.log')
```

#### 3.2.3 Handling Input

You can provide input to stdin stream using the `:input` key. For instance, given the following executable called `cli` that expects name from `stdin`:
Expand Down

0 comments on commit 47af629

Please sign in to comment.