Edit by browser
This commit is contained in:
parent
e48b1d713e
commit
15683b87e4
|
@ -1,4 +1,62 @@
|
|||
#!/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
|
||||
else
|
||||
echo "请检查自己的代码,是否满足题目要求!"
|
||||
fi
|
Loading…
Reference in New Issue