command #检测某个命令是否存在 # bashcommand -v python2 command -v python2 2> /dev/null若存在,则输出: text/usr/bin/python2若不存在,则无输出,退出码为1。