How do you move lines of numbers i.e.(131, 134, 116, etc...) based on the month? Say for instance I only wanted June numbers and not July. This is what the file looks like so far but it runs everyday in a cron job so it will build to July.
#cat backupcount.log
131 ,Thu Jun 05 08:00:41 2008
134 ,Fri Jun 06 09:41:39 2008
116 ,Sat Jun 07 08:15:24 2008
106 ,Sun Jun 08 08:15:23 2008
95 ,Mon Jun 09 08:15:23 2008
117 ,Tue Jun 10 08:15:42 2008
140 ,Wed Jun 11 08:15:37 2008
I guess my problem is how do you move or copy based on the month. I thought about -mtime in relation to +30 days but some months have 28 and 31 days. How can I differentiate based on the month?
BTW, your message was kind of confusing. It seems like you just want to keep your log file cleaned up, and that's what I did. If you're actually trying to move files around, that's another thing entirely.
-mschwage
What I am trying to do is calculate all the numbers from the first field at the end of the month for a grand total of the month that just passed. Say for instance all of June on the 1st of July. I know I could just grab those numbers in stick them into excel but I know there is a way to do it on the command line .
I have one more question. Say for instance in December after the log file has compiled more data I want to be able to go to whatever month i want and the script reads that month and give me the output. Like a case and read statement I guess...then it gives you the information(Month) or total you want.