首页 linux shell bash shell bash shell 判断软件是否安装 bash shell 判断软件是否安装2021年3月18日bash shell, linux, shell 最近写bash shell脚本 需要判断软件是否安装 去网上查了一下 有以下两种方式: 第一种方式: if [ ! "$(command -v git)" ]; then echo "git 没有安装" >&2 exit 1 fi 第二种方式: if ! [ -x "$(command -v git)" ]; then echo "git 没有安装" >&2 exit 1 fi 标签# bash 分享你的喜爱 上一页 文章 国内 wordpress Gravatar 头像无法显示/标签颜色/运行时间 下一页 文章 shell 语言注意事项 相关文章 戴尔服务器IDRAC8 连接虚拟控制台时提示连接失败解决方法 2020年5月8日 使用canal监听binlog将数据发送到RocketMQ同步到es 2024年6月6日 apache-错误解决方案 2020年2月3日 linux 安装docker-ce 2020年3月26日