MACSCRPT Archives

November 2009

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Mime-Version:
1.0 (Apple Message framework v1076)
Content-Type:
text/plain; charset=us-ascii; format=flowed; delsp=yes
Date:
Wed, 4 Nov 2009 08:22:41 -0800
Reply-To:
Macintosh Scripting Systems <[log in to unmask]>
Subject:
From:
In-Reply-To:
Content-Transfer-Encoding:
7bit
Sender:
Macintosh Scripting Systems <[log in to unmask]>
Parts/Attachments:
text/plain (28 lines)
  Thanks all for the advice.  That part of the script is working, but  
I'm a bit concerned because I don't think I could debug it if  
something goes wrong.  But what could go wrong?

Well, now that I have the list of numbers I need to use them to  
extract lines from various files that are in pipe delimited  
format.Each number is unique and only appears in one line of the file.


The problem is when I run either of the scripts below the result is  
every single line of the file.


set thePattern to "\\|4571100\\||12245332\\||7519636\\||4824164\\||2971399\\||925639\\|| 
"
set myShellScript to "egrep " & quoted form of thePattern & " " &  
quoted form of programFile
set myOutput to do shell script myShellScript

set thePattern to "\\|4571100\\||"
set myShellScript to "egrep " & quoted form of thePattern & " " &  
quoted form of programFile
set myOutput to do shell script myShellScript

Any ideas what I'm doing wrong?

ES

ATOM RSS1 RSS2