906
906

Reputation: 55

How to save and display log information simultaneously by using Ruby command

I have tried ruby test.rb > Result.txt

However, printf information only saves in result.txt but it does not show in Ruby console.

Any Ruby command could save and display log information simultaneously?

Upvotes: 0

Views: 35

Answers (1)

Aleksei Matiushkin
Aleksei Matiushkin

Reputation: 121010

Assuming you are on unix:

ruby test.rb | tee Result.txt

Upvotes: 2

Related Questions