我正在尝试做的事情:
With cat command create a file named Merge which is the merge of
test.txt and Copy(in a different directory than test.txt)
test.txt
和Copy
都包含相同的内容:
reglib
test.txt
所以我期望是:
reglib
test.txt
reglib
test.txt
我尝试过的:
cat /home/eleve/Copy | cat test.txt >Merge.txt
cat /home/eleve/Copy >Merge.txt | cat test.txt >Merge.txt
cat /home/eleve/Copy >Merge.txt | cat test.txt >>Merge.txt
并且所有这些命令给了我相同的错误结果:
reglib
test.txt
有人可以建议我正确的命令吗?谢谢。
您可以在多个文件上使用“ cat”,在这种情况下,它将按顺序将它们打印出来。
cat test.txt Copy