回显到stdout并追加到文件 [英] echo to stdout and append to file
本文介绍了回显到stdout并追加到文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这个:
echo "all done creating tables" >> ${SUMAN_DEBUG_LOG_PATH}
但这仅应附加到文件,而不应写入stdout.如何写到stdout并追加到同一bash行中的文件?
but that should only append to the file, not write to stdout. How can I write to stdout and append to a file in the same bash line?
推荐答案
像这样吗?
echo "all done creating tables" | tee -a "${SUMAN_DEBUG_LOG_PATH}"
这篇关于回显到stdout并追加到文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文