Shell判断字符串是否含有特定字符
场景:判断字符abcde是否含有字符abc [[ “abcde” =~ “abc” ]] && echo “this is true” || echo “this is not true” if [[ “abcde” =~ “abc” ]]; then echo “this is true” else echo “this is not true”; exit fi
场景:判断字符abcde是否含有字符abc [[ “abcde” =~ “abc” ]] && echo “this is true” || echo “this is not true” if [[ “abcde” =~ “abc” ]]; then echo “this is true” else echo “this is not true”; exit fi
apt 是 apt-get、apt-cache 和 apt-config 中最常用命令选项的集合 apt 命令 取代的命令 命令的功能 apt install apt-get install 安装软件包 apt remove apt-get remove 移除软件包 apt purge apt-get purge 移除软件包及配置文件 apt update apt-get update 刷新存储库… 阅读更多 »apt vs apt-get