I have a problem when I did a file search with the script below, it looks in all the sub-directory instead of just EXPLOIT, I can not find or is the error ?? if anyone can help me? thank you
#send.sh 20160824 1500 20160825 1900
in 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
}'
it searches EXPLOITNONE not just 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