Gambit-C 方案中的 stdout 是怎么回事?
这是怎么回事,如何捕获 Gambit-C 程序的输出?
$ gsi -e "(pp 'hello?)"
hello?
$ gsi -e "(pp 'hello?)" >asdf
hello?
$ gsi -e "(pp 'hello?)" 2>asdf
hello?
$ cat asdf
它应该将程序的输出放入 asdf
中,但它是空的! 是否可以设置编译时或运行时选项,使其像正常的 UNIX 程序一样对待 stdout? (最好是编译时)
What's up with this, how do I capture the output from my Gambit-C program?
$ gsi -e "(pp 'hello?)"
hello?
$ gsi -e "(pp 'hello?)" >asdf
hello?
$ gsi -e "(pp 'hello?)" 2>asdf
hello?
$ cat asdf
It should have put the output of the program into asdf
, but it's empty!
Is there a compile-time or run-time option I can set to make it treat stdout like a normal unix program? (Preferably compile-time)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不熟悉
pp
,但你似乎想要pretty-print
:I am not familiar with
pp
, but you seem to wantpretty-print
: