You might try something like this. I put grep inside of the find command.
Code:
touch --d 20080213 end
touch --d 20080212 start
find ./ -maxdepth 1 -type f -newer start -not newer end -exec grep "xxxx" '{}' \;
Another method is to iterate through the output, but there are two problems. First, the output contains more than the filename. Second, you may run out of memory.
Assuming you won't run out of memory, this will list just the filenames from the last field:
Code:
ls -l | awk 'BEGIN {FS=" *"} /Feb 12/{ print $NF }'
Using ls and filtering out just the filenames can be tricky if there might be white space in the filenames.
Code:
for file in $(ls -l | awk 'BEGIN {FS=" "} /Feb/{ for (i = 9; i <= NF; i++) printf "%s ", $i; printf "\n"}'); do
grep 'xxxx' "$file"
done
But with thousands of results, you may run out of memory due to the expansion of the arguments. The trailing space at the end of the filenames may cause a problem as well. Using the find command would be a better way.