Re: How to use "do shell script" to search for RegExps
Re: How to use "do shell script" to search for RegExps
- Subject: Re: How to use "do shell script" to search for RegExps
- From: Emmanuel <email@hidden>
- Date: Thu, 22 Apr 2004 10:13:36 +0200
At 4:56 PM -0400 21/04/04, Rebecca O'Connell wrote:
>
I have read a number of thread where someone suggests using "do shell
>
script" and perl to do a string search. Could someone post an example of the
>
syntax one would use to do this? For example if wanted to do something
>
equivalent to
>
>
if myVar contains \(a|A)\ then set hasA to true
>
>
using a shell script how would I go about it?
Not a reply to your question, but why not using AppleScript? It's more user-friendly, and the parameter passing mechanism is far more sophisticated and powerful than for shell scripts, isnt'it.
Using the Satimage osax:
--------------------------
set hasA to false
try
find text "a" in myVar without case sensitive
set hasA to true
end try
--------------------------
And, in case you're wondering, Satimage's 'find text' is as fast as, e.g., the 'grep' shell command.
Satimage.osax is free:
<
http://www.satimage-software.com/en/downloads_osaxen.html>
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.