I am looking for some to write a script for me that can be run on a UNIX or Linux server to grab log entries based on X amount of days in the past.
Will prefer this to be written in BASH. PERL can be considered
Script Requirements:
1. command line
2. Will ask user the directory path and name of the log file
3. Will ask user the date format of log file (that is date syntax to match)
4. Will ask user how many days back they want to review log file
5. Default date will be current system date.
6. Will ask user the desired path and name of the output file. Default will be original log [login to view URL]
7. Will grab the pertinent log entries and send to a file in user indicated path
8. Script must take into account monthly calendars (example months that are 27days, 28days, 30days and 31days)
9. Ability to attach additional parameters to script (example ./script | grep whatever)