回显到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}"