Ste*_*fan 1 bash io-redirection
可能的重复:
bash 有没有办法重定向输出并仍然让它转到标准输出?
我将如何发送/dev/stdin到两个/dev/stdout和$logfile一个命令?
一种解决方案是对两者都做一次:
cat /dev/stdin > $tempfile;
cat $tempfile > /dev/stdout;
cat $tempfile > $logfile;
Run Code Online (Sandbox Code Playgroud)
但这似乎很糟糕。有没有更好的办法?
| 归档时间: |
|
| 查看次数: |
1421 次 |
| 最近记录: |