摘要: 1、字段 grep:案例: str1="abcdefgh"str2="def"result=$(echo $str1 | grep "${str2}")if [[ "$result" != "" ]];then echo "包含"else echo "不包含"fi 2. 字符串运算符 =~:案例:s 阅读全文
posted @ 2019-08-28 17:38 e-8bit 阅读(31518) 评论(0) 推荐(0) 编辑