查找文件中的字符串

tech2026-01-11  13

essid="MEIZU" ess_file="/tmp/essid_ap.log"

#找到返回1,没找到返回0 

if [ 1 -eq `grep -c $essid $ess_file` ]         then                 echo "2222"         else                 echo "3333"         fi

最新回复(0)