Re: Extracting text from an Retrospect Log
Re: Extracting text from an Retrospect Log
- Subject: Re: Extracting text from an Retrospect Log
- From: Michael Slomski <email@hidden>
- Date: Mon, 13 Mar 2006 21:19:44 +0100
- Thread-topic: Extracting text from an Retrospect Log
Title: Re: Extracting text from an Retrospect Log
Hello Gnarlie,
yes, something like this, unfortunately I’m also not good at regex :-((( so bevor I can cry “hurra, thats it” I have to know the right regex so that I will get “∆ $[31]Retrospect$[32] version 5.1.177:”
If I change it to
set filePath to quoted form of (POSIX path of "tmp:Operations Log")
set someRegex to "Retrospect"
--do shell script "sed -n \"`sed -n '/" & someRegex & "/=' " & filePath & " | tail -1`,\\$p\" " & filePath
do shell script "sed -n \"`sed -n '/" & someRegex & "/=' " & filePath & " | tail -1`,\\$p\" " & filePath
I get the whole file instead of the wanted rest :-(
I think, the result of your example will extract the important text part which then could be reniced in a second run (removing this anoying “$[*!s302,,14,+3]” which is occuring; Retrospect will display some icon instead).
kindly regards
Michael
am 13.03.2006 20:42 Uhr, Gnarlodious at email@hidden schrieb:
set filePath to "~/path"
set someRegex to "somestring"
do shell script "sed -n \"`sed -n '/" & someRegex & "/=' " & filePath & " | tail -1`,\\$p\" " & filePath
_______________________________________________
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