#!/bin/bash#my=`grep -c 'print' views_test.py`#echo $my#echo $mystrA="helloworld"strB="lowp"strC="help"strD="rldp"if [[ $strA =~ $strB || $strA =~ $strC || $strA =~ $strD ]];thenecho "包含"elseecho "不包含"fi
注:执行shell脚本时,若一直格式错误,可cat进行查看脚本文件,看是否正常。
cat -A filename.txt