Edit by browser

This commit is contained in:
实践教学 2020-10-21 15:23:32 +08:00
parent 99076cdb7f
commit 1b04d7c969
1 changed files with 0 additions and 58 deletions

View File

@ -1,62 +1,4 @@
#!/bin/bash
#cd /data/workspace/myshixun/step1/
a='rm'
b='echo'
c='EOF'
d='<<'
e='>>'
f='ZhangSan'
g='WangWu'
count=0
if cat /data/workspace/myshixun/step1/daan.sh|grep "$a">/dev/null
then
count=$((${count} + 1))
echo "使用rm属于作弊行为"
fi
if cat /data/workspace/myshixun/step1/daan.sh|grep "$b">/dev/null
then
count=$((${count} + 1))
echo "使用echo属于作弊行为"
fi
if cat /data/workspace/myshixun/step1/daan.sh|grep "$c">/dev/null
then
count=$((${count} + 1))
echo "使用EOF属于作弊行为"
fi
if cat /data/workspace/myshixun/step1/daan.sh|grep "$d">/dev/null
then
count=$((${count} + 1))
echo "使用重定向属于作弊行为"
fi
if cat /data/workspace/myshixun/step1/daan.sh|grep "$e">/dev/null
then
count=$((${count} + 1))
echo "使用重定向属于作弊行为"
fi
if cat /data/workspace/myshixun/step1/daan.sh|grep "$f">/dev/null
then
count=$((${count} + 1))
echo "禁止出现人名"
fi
if cat /data/workspace/myshixun/step1/daan.sh|grep "$g">/dev/null
then
count=$((${count} + 1))
echo "禁止出现人名"
fi
if [ $count -eq 0 ];then
sh /data/workspace/myshixun/step1/daan.sh /data/workspace/myshixun/step1/test.txt
else
echo "请检查自己的代码,是否满足题目要求!"
fi