How to hide command output in Bash

后端 未结 7 1423
天涯浪人
天涯浪人 2020-12-02 05:42

I want to make my Bash scripts more elegant for the end user. How do I hide the output when Bash is executing commands?

For example, when Bash executes



        
7条回答
  •  误落风尘
    2020-12-02 06:12

    >/dev/null 2>&1 will mute both stdout and stderr

    yum install nano >/dev/null 2>&1
    

提交回复
热议问题