会员
周边
新闻
博问
融资
云市场
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
e-8bit
生活的理想就是理想的生活~
博客园
首页
新随笔
联系
管理
2019年8月28日
Shell脚本中判断字符串是否被包含在内
摘要: 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)
编辑
公告