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.
我的 bash 脚本中有一些行计算值并显示在屏幕上。可以说,
Adder $a $b
我想在文本文件中打印 Adder 返回的值。我该怎么做?
假设加法器运行了几个循环。
尝试将其管道传输到tee:
tee
Adder $a $b | tee output.txt
http://linux.die.net/man/1/tee