摘要: Shell判断字符串包含关系的几种方法 Shell中判断字符串包含关系的方法: 1、通过grep来判断: str1="abcdefgh" str2="def" result=$(echo $str1 | grep "${str2}") if [[ "$result" != "" ]] then ec 阅读全文
posted @ 2023-02-21 16:48 paul_hch 阅读(1144) 评论(0) 推荐(0) 编辑