html tool

2021年12月7日星期二

shell 字符串包含验证

 参考: https://blog.csdn.net/iamlihongwei/article/details/59484029

=~


  # res=`cat lag_kafka|jq "." 2>&1`
# echo ${res}
parse error: Invalid numeric literal at line 2, column 0
# if [[ ${res} =~ "parse error:" ]]
> then
>     echo "err"
> fi
err


  

没有评论:

发表评论