不会写shell,网上搜了一下
https://blog.csdn.net/buster2014/article/details/46288109?_t_t_t=0.586369093041867
#!/usr/bin/bash
#grep -c 返回 file中,与“未选定行”匹配的行数
if [ `grep -c "未选定行" lxcswj.buf` -ne '0' ];then
echo "find this key"
else
echo "hello"
fi
您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!