• 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: Extracting text from an Retrospect Log
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Extracting text from an Retrospect Log


  • Subject: Re: Extracting text from an Retrospect Log
  • From: Gnarlodious <email@hidden>
  • Date: Mon, 13 Mar 2006 14:14:17 -0700
  • Thread-topic: Extracting text from an Retrospect Log

Title: Re: Extracting text from an Retrospect Log
It sounds like Retrospect is so stupid it writes logfiles with Mac lineendings. You should use rsync, it is really the right tool for UNIX file synchronizing.

You need to first translate the logfile to UNIX lineendings so sed will recognize more than one long line:

-- I am adding more character here and double escaping them since they are all regex reserved characters (stupid Dantz programmers). You may need to add more characters here to identify the unique line, but you get the idea:
set someRegex to "\\\\]Retrospect\\\\$\\\\["
-- translate Mac to UNIX
do shell script "tr '\\r' '\\n'  < '/tmp/Operations Log' > /tmp/Retrospect.txt"

do shell script "sed -n \"`sed -n '/" & someRegex & "/=' /tmp/Retrospect.txt | tail -1`,\\$p\" /tmp/Retrospect.txt"


That should do it.

-- Gnarlie
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Extracting text from an Retrospect Log
      • From: "John C. Welch" <email@hidden>
    • Re: Extracting text from an Retrospect Log
      • From: "Gary (Lists)" <email@hidden>
    • Re: Extracting text from an Retrospect Log
      • From: Michael Slomski <email@hidden>
  • Prev by Date: Re: Extracting text from an Retrospect Log
  • Next by Date: Re: Extracting text from an Retrospect Log
  • Previous by thread: Re: Extracting text from an Retrospect Log
  • Next by thread: Re: Extracting text from an Retrospect Log
  • Index(es):
    • Date
    • Thread