• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: logfiles and date math
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >logfiles and date math (From: dean ross-smith <email@hidden>)

  • Prev by Date: Re: Eigenvalues &/or eigenvectors, anyone?
  • Next by Date: Powermac4u = post office box
  • Previous by thread: logfiles and date math
  • Next by thread: How To Add Attachments To A Message In Mail.app?
  • Index(es):
    • Date
    • Thread