什么是&&意味着什么?

这个问题在这里已经有了答案:

  • 在shell中,“2>&1”是什么意思? 15个答案

  • 让我们来看看man bash

       Redirecting Standard Output and Standard Error
       This construct allows both the standard output (file descriptor 1) and the  stan‐
       dard  error output (file descriptor 2) to be redirected to the file whose name is
       the expansion of word.
    
       There are two formats for redirecting standard output and standard error:
    
              &>word
       and
              >&word
    
       Of the two forms, the first is preferred.  This is semantically equivalent to
    
              >word 2>&1
    

    换句话说, >& /dev/null从命令中抑制输出和错误/信息性消息。

    链接地址: http://www.djcxy.com/p/25591.html

    上一篇: What does >& mean in command?

    下一篇: What is the use of 2>&1 in shell scripting