|
Grep Different Files Using a Loop?
I have a script to GREP for a text expression within certain files, the files being named file.11012008 thru file.11302008. 30 files in all, one for each day of the month.
Instead of entering the following 3 lines of code 30 different times, I'm trying to find a way to loop the process:
#insert the heading of the search
echo 11/01/2008 >> LOG_FILE
#insert blank line below the heading
echo "" >> LOG_FILE
#grep for the text and its entire line, then insert in log file.
grep "search_text" search/path/file.11012008 >> LOG_FILE
Thanks a million!
|