多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# Linux检测命令是否存在 如果要兼容POSIX的话可以使用command: ~~~ command -v <the_command> ~~~ 示例: ~~~ if ! [ -x "$(command -v git)" ]; then   echo 'Error: git is not installed.' > &2   exit 1 fi ~~~ bash环境可以使用hash 或 type: ~~~ hash <the_command>  type <the_command>  ~~~ 示例:检查gdate是否存在 ~~~ gnudate() {     if hash gdate 2>/dev/null; then         gdate "$@"     else         date "$@"     fi } ~~~