Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在不使用 dir/s subhang.txt 的情况下查找是否存在名为 name 的文件。你能告诉我如何使用管道以及如何使用管道连接两个 C 程序吗
命令:
dir/s *.txt >search.txt | find "name"
...不起作用,因为 的输出dir/s进入文件search.txt。如果你试试:
dir/s
search.txt
dir/s *.txt | find "name"
...这会将结果输出find到控制台,或者
find
dir/s *.txt | find "name" >search.txt
... 将查找结果输出到文件search.txt中。