求计算机高手解答此题目!!讲解啊!!详细点!!谢谢

Which of the following is (are) true regarding the use of Standard Input and Standard Output logical device facilities provided through an operating system✀s command line interface?I. Use > abc.txt to change the Standard Output logical device to be the file abc.txt. II. Use << abc.txt the change the Standard Input logical device to be the file abc.txt. III. Use the | character between two commands, allowing the output of the first to be used as input for the second. (a) I and II only (b) I only (c) I, II, and III (d) I and III only
2026年09月21日 01:32
有1个网友回答
网友(1):

这个应该I和III是对的,比如在Unix环境下,你运行一个程序./some_prog > results.txt那么就是把该程序的输出放进results.txt文件里(这样会覆盖原有文件内容)
如果./some_prog >> results.txt,那么输出的结果会加在这个文件的尾部。

而'<'表示的是从后面的文件中输入。
最后一个'|'表示piping,意思就如最后一个选项里说的,该符号前面命令的输出将作为后面命令的输入。

我记得有本书Computer Systems: A Programmer's Perspective里有说到过,不太记得了,好几年了都。

还有可以去我参考资料里注明的这个网址看一下,有英语的说明。