Subject: | |
From: | |
Reply To: | |
Date: | Wed, 9 Sep 2009 09:46:12 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Hi, I have a rather large file (1 gig+) that contains pipe delimited data.
I'm running a shell script from AppleScript that pulls every line that
begins with a particular string.
Do shell script "Grep ^" & foo & "\|" & myFile
Takes a while, but it works.
Often I have to extract several matches, and I'm wondering if it's possible
to something like this:
Do shell script "Grep ^" & foo & "\| ^" & foo1 & "\| ^" & foo2 & "\| ^" &
foo7 & "\|" myFile
--doesn't work and I've tried numerous variations
The result would be any lines that begin with any of those strings.
Then, if that is possible, the next question would be is that more efficient
than repeat through a loop for larger numbers of items (100+)?
ES
|
|
|