Re: logfiles and date math
Re: logfiles and date math
- Subject: Re: logfiles and date math
- From: Rob Morton <email@hidden>
- Date: Fri, 09 May 2003 13:22:19 -0400
I haven't really tried this (always a great disclaimer), but I have
personally been staying away from date math in AS. Instead of doing
set mycurdate to (current date) as date
I would do
set mycurdate to do shell script "date +'%b %d, %Y %l:%M %p'"
That would put it in the format you are looking for I believe. If you need a
different format here is a really nice site for the settings
http://unix.about.com/library/weekly/aa042301a.htm
Rob Morton
on 5/8/03 12:13 PM, dean ross-smith at email@hidden wrote:
>
hi all-
>
I'm working on a logfile problem in os 9.2.2. I'm trying to truncate
>
logfiles for an FTP script that uses Fetch. I've found 3 ways to
>
truncate logs: brute force truncate to X number of lines, rotate the
>
logs so that I have daily logs.1 through logs.7 or I can read in the
>
logfile and keep X days worth of files.
>
I thought option 3 would be the most elegant and coded it. My problem
>
is that it is pretty slow. I'm wondering if anyone has ideas how to
>
speed up the date parsing in the repeat loop.
>
>
The log format is like this...
>
>
May 6, 2003 7:57 PM
>
----] Stopping SpeedRJ
>
May 6, 2003 8:47 PM
>
----] Starting SpeedRJ
>
May 6, 2003 8:52 PM
>
----] Sent Asura_Hot_Folders:classified:classpag_bw_out:cd2749095
>
----] 172.16.140.53/
>
May 6, 2003 8:52 PM
>
----] Sent Asura_Hot_Folders:classified:classpag_bw_out:cd2749095
>
----] 172.16.140.54/
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.