With Bash Scripting, how can I suppress all output

2019-01-04 15:32发布

I have a bash script that runs a program with parameters. That program outputs some status (doing this, doing that...). There is no option for this program to be quiet. How can I prevent the script from displaying anything?

I am looking for something like windows "echo off".

7条回答
叼着烟拽天下
2楼-- · 2019-01-04 16:34

Like andynormancx post use this: (if you're working in an Unix environment)

scriptname > /dev/null

or you can use this: (if you're working in a Windows environment)

scriptname > nul
查看更多
登录 后发表回答