更新时间:2022-11-07 12:25:01
使用 tee 命令:
tee
echo "hello" | tee logfile.txt
Shell脚本:如何在控制台上将字符串写入文件和stdout?