Re: Finding lines containing foo in a file
Re: Finding lines containing foo in a file
- Subject: Re: Finding lines containing foo in a file
- From: Serge Ségu <email@hidden>
- Date: Wed, 21 Dec 2005 11:53:44 +0100
Le 21 déc. 2005, à 02:05, Stockly, Ed a écrit :
[...] I need to get every line that contain specific strings. [...]
Any vanilla AppleScript* suggestions?
with "classic" style ?
set theLines to every paragraph of (read (choose file))
set {stringToFind, FoundLines} to {{"misc1", "misc2"}, {}}
with timeout of (10 * minutes) seconds
repeat with oneLine in theLines
repeat with oneString in stringToFind
if oneString is in oneLine then ¬
set FoundLines to FoundLines & oneLine
end repeat
end repeat
end timeout
return FoundLines
--
Serge Ségu
_______________________________________________
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