Hello,
I need help figuring out how to do the following, I am very new to Perl.
I am on a unix box, I have a directory that has an unknown amount of files in it. The files are listed in the following format. (date)_01day, 07day,30day.
So I have the folowing for 7/18.
040718_01day
040718_07day
040718_30day
Inside the files are a list of Mac addresses in order, ex:
00:02
E:81:F7:06
00:02
E:81:F7:07
What I need to do is take the last 7 days worth of the _01day files and compare each file so that only the Mac addresses that showed up in all 7 files are outputed to a new file called date_07day.
Then I also need to do the same for the last 30 days of files, and output it to a new file called date_30day. Any help is greatly appreciated.
I want to be able to do this everyday, so the filenames will keep changing date wise.
If possible i would like to be able to, from the command line type:
nameofperlscript 040718_01day and have it compute all of the above counting the 18th as the 1st day of 7 and 30.