From: Green, Simon (Simon.Green@EU.ALTRIA.COM)
Date: Mon Apr 05 2004 - 04:47:01 EDT
A crude approach would be to do a grep -n for the first date you want to
keep. Then use the line number for the first result with the tail command
to copy everything you want to keep to a new file.
-- Simon Green Altria ITSC Europe Ltd AIX-L Archive at https://new-lists.princeton.edu/listserv/aix-l.html New to AIX? http://publib-b.boulder.ibm.com/redbooks.nsf/portals/UNIX N.B. Unsolicited email from vendors will not be appreciated. Please post all follow-ups to the list. > -----Original Message----- > From: Leyden, Joseph [mailto:LeydenJ@MTA.NET] > Sent: 01 April 2004 16:58 > To: aix-l@Princeton.EDU > Subject: Re: would like to write a crontab/script > > > If my data log file starts with the date like this: > > 03/31/04 etc data data ..... > > how do I set up a script to delete more than a week old > of data. In this case, delete everything since the beginning > of the log up to 03/24/04.
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:48 EDT