将irb输出的内容写入txt文件 [英] write the contents of the irb output to a txt file

查看:67
本文介绍了将irb输出的内容写入txt文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

令人难以置信,irb窗口上的scoll不包含我写的查询的所有结果,我知道这是因为我在desc中颠倒了查询并且显示了其他内容。



我可以将irb输出(全部)写入txt文件吗?



任何指导都表示赞赏,试图寻找示例,再次我的推荐bok让我失望



谢谢

mind boggled, the scoll on the irb window does not contain all the results of the query i wrote, i know this as i reversed the query in desc and it shows other things.

can i write the irb output (all of it) to a txt file?

any guidance is appreciated, puling hair out trying to find examples, and yet again my refernce bok is letting me down

thank you

推荐答案


stdout = File.new('console.out','w')



done
stdout = File.new('console.out', 'w')

done


这篇关于将irb输出的内容写入txt文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆