在Bash中,如何判断某个命令是否存在?

if ! type "$foobar_command_name" > /dev/null; then
# install foobar here,or poping up some warning messages
fi
references:
http://*.com/questions/7522712/how-to-check-if-command-exists-in-a-shell-script
http://*.com/questions/592620/how-to-check-if-a-program-exists-from-a-bash-script
上一篇:【转载】浅谈HTTPS以及Fiddler抓取HTTPS协议


下一篇:HDU 4864 Task (贪心+STL多集(二分)+邻接表存储)(杭电多校训练赛第一场1004)