我的理解是linux中的所有命令都必须存在于$PATH上,即使对于最基本的命令也是如此。> which cd> which ls但当我尝试which pushd时,令我惊讶的是,它又回来了:
/usr/bin/which: no pushd in (/bin:/usr/share/maven/bin:/usr/share
/build_externals_linux.sh: line 41: pushd: bakefile: No such file or directory./build_externals_linux.sh: line 59: pushd: pcre: No such file or directo
根据它的值,我想抑制输出(在下面的示例中是pushd,但实际上是其他命令,主要是git命令)。示例:# pushd optionally outputs path (works but too long) pushd ..fi
popd > /dev/null # the same if.. would be needed h