如何在控制台上写一个字符串到文件和stdout?
如果我做
echo "hello" > logfile.txt
我只在logfile.txt中查看hello,但是如何在Linux的控制台上编写hello?
使用
tee
命令:
echo "hello" | tee logfile.txt