我在 import脚本中加入 count=ps x |grep "excall"|grep -c "import.sh" if [ $count -gt 1 ] then echo "have"$count exit -1 fi 这一段 用于判断我在其他目录运行的时候是否有其他import再使用,但次次都count都是2,这事什么原因导致的呢。具体设置到什么原理呢?求解
ps x |grep "excall"|grep -c "import.sh"
收起
再加一个不匹配自身
grep -v "grep"
报告相同问题?