Linux command

command

command 简介 

使用参数运行命令,忽略任何名为 system_command 的 shell 函数。

command 使用方法

command [-pVv] system_command [arguments ...]

Example:

1. 判断Linux中是否有python,有则输出yes,没有输出no。

if command -v python >/dev/null 2>&1
then
    echo "yes"
else
    echo "no"
fi

  

  

posted @ 2022-03-16 14:18  zhuang6  阅读(91)  评论(0编辑  收藏  举报