在Linux(Ubuntu)中将命令行输出打印到文本文件中

Blu*_*Bit 1 c++ linux command-line

我在Linux(Ubuntu)中有一个C ++程序,可以在命令终端中打印很长的输出。

如何通过Linux命令将此输出从命令终端直接复制到.txt文件?

Ker*_* SB 5

您的外壳程序通过输出重定向为您完成此操作:

$ ./a.out > theoutput.txt
Run Code Online (Sandbox Code Playgroud)