[英]Run bash with see the prints made by echo in script
I got one script and I am designning a new one and the given script will be used and be called. 我得到了一个脚本,并且我正在设计一个新的脚本,并且将使用给定的脚本并对其进行调用。
The thing is that the given one contains lots of "echo" prints. 问题是给定的包含许多“回声”打印。
Is there a way to use given script but not get those prints in the console? 有没有一种方法可以使用给定的脚本,但不能在控制台中获得这些打印件?
Thanks 谢谢
just run this, 只是运行这个,
yourscript.sh > /dev/null
It will send the output far, far away 它将输出发送到很远的地方
You can also do yourscript.sh
: 您也可以执行
yourscript.sh
:
#!/bin/bash
exec 1>/dev/null
# rest of the script...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.