0

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?

1 Answer 1

2

Assuming you are on unix:

ruby test.rb | tee Result.txt
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your answer. By the way, I am using Windows. OK, I will try to install 'tee' in my OS. Thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.