当我使用下面的脚本进行文件搜索时出现问题,它在所有子目录中查找而不是仅仅是EXPLOIT,我找不到或者是错误?如果有人可以帮助我?谢谢
#send.sh 20160824 1500 20160825 1900
send.sh中的:
find data -type d -name "EXPLOIT" |
awk -v start=$1 -v end=$3 -F/ '$3>=start && $3<=end' |
xargs find -type f |
awk -v start=$1$2 -v end=$3$4 -F/ '
{
t=strtonum($5)
}
t>=start && t<=end {
print
}'
它搜索EXPLOITNONE而不仅仅是EXPLOIT
./data/20160824/EXPLOIT/201608241555-toto.tz
./data/20160824/EXPLOIT/201608241540-toto.tz
./data/20160824/EXPLOITNONE/201608242140-totoNONE.tz
./data/20160824/EXPLOITNONE/201608241550-totoNONE.tz