Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shell-Perl-AppleScript scripting



Yes, it makes some sense. I'll give it some further consideration and I appreciate it.

John Fowler

On Dec 28, 2003, at 11:15 PM, Stevan Reese wrote:

#!/usr/bin/perl
BEGIN {
chomp($ARGV [0] = <<'UnLiKeLyStRiNg');
your search string goes here, as is
UnLiKeLyStRiNg
chomp($ARGV [1] = <<'UnLiKeLyStRiNg');
your replace string goes here, as is
UnLiKeLyStRiNg
}
s/$ARGV [0]/$ARGV [1]/g;

save this to /path to myscript/Content/Resources/searchreplace.pl
Add something like this to the beginning of your script
set PathToMe to path to me as text
set PathToMeToo to (quoted form of POSIX path of PathToMe) as text
set PathToResources to PathToMeToo & "/Contents/Resources/"
call the perl script with
do shell script PathToResources & "your arguments"

Does this make any sense?
_______________________________________________
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.

References: 
 >Re: Shell-Perl-AppleScript scripting (From: John Fowler <email@hidden>)
 >Re: Shell-Perl-AppleScript scripting (From: Stevan Reese <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.