Im writing a shell script but I stuck in a problem:
I have files like this in a directory:
I have more than one file for each day - for example of the day 13th I have two...
So, what I need is that every, lets say Friday, I need to do a grep on the files of the last 7 days and get some information..
I was thinking on use a ´for´ statment to increase variable here:
date +"%Y%m%d" --date="1 day ago"
And then a grep like this:
cat TrafficErrorEvents$VARIABLE.* | grep XXXXX
Is this the easy/fatest way to do this?
How can this for be? - the syntax?