On Thu, Sep 17, 2009 at 4:13 PM, [log in to unmask] <[log in to unmask]> wrote:
> Just when I thought I'd figured this out..
> The version below returns every line of the file.
Then you must be doing something else wrong. I pasted your script and
your sample data and it works as expected.
set mLogFile to "/Users/mreed/tv.txt"
set channelID to "(TRAV)"
set thePattern to channelID
set thePattern to "\\|" & channelID & "\\||"
--set myShellScript to "egrep " & thePattern & " " & quoted form of mLogFile
set myShellScript to "egrep " & quoted form of thePattern & " " &
quoted form of mLogFile
set mySchedule to do shell script myShellScript
return mySchedule
returns only the one line:
--11:00 pm|(TRAV)|LOG|Most Haunted USA|<snip>
--
Mark J. Reed <[log in to unmask]>