程序快速将数据转储到标准输出。寻找编写命令而不被淹没的方法
程序正在转储到标准输出,当我尝试输入新命令时,我看不到我正在写的内容,因为它会与输出一起抛出。是否有一个 shell 将命令和输出分开?或者我可以使用两个 shell,在一个 shell 上运行命令并将其转储到另一个 shell 的标准输出吗?
Program is dumping to stdout and while I try to type new commands I can't see what I'm writing because it gets thrown along with the output. Is there a shell that separates commands and outputs? Or can I use two shells where I can run commands on one and make it dump to the stdout of another?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
“more”可让您对输出进行分页,而“tee”可让您分割程序输出,因此它会同时发送到标准输出和文件。
最重要的是
There's 'more' to let you pageinate through output, and 'tee' which lets you split a programs output, so it goes to both stdout and to a file.
and best of all
运行程序时,要么重定向标准输出和错误,这样它就不会打扰您:
或者,运行另一个终端来完成您的工作。这使您的程序可以自由地将其喜欢的任何内容输出到终端,而不会打扰您。
话虽如此,我仍然将程序中的信息捕获到文件中,以防您必须返回并查看它。
Either redirect standard output and error when you run the program, so it doesn't bother you:
or, alternatively, run a different terminal to do your work in. That leaves your program free to output whatever it likes to its terminal without bothering you.
Having said that, I'd still capture the information from the program to a file in case you have to go back and look at it.
您可以将程序的输出重定向到另一个终端窗口。例如:
终端名称的样式可能取决于您的系统的组织方式。
You can redirect the output of the program to another terminal window. For example:
The style of terminal name may depend on how your system is organized.