do shell script "perl... " to find/replace in a string
do shell script "perl... " to find/replace in a string
- Subject: do shell script "perl... " to find/replace in a string
- From: Joseph Weaks <email@hidden>
- Date: Wed, 17 Mar 2004 00:26:15 -0600
I am at a loss when trying to figure out the syntax for perl/unix
commands. Given three variables, what would be a one liner do shell
script command that replaced every occurrence of findString in
sourceText with replaceString? I'm looking for something like:
set shellCommand to "perl blah blah" & quoted form of sourceText &
"blah blah" & quoted form of findString & "blah blah" & quoted form of
replaceString & "blah blah blah"
set sourceText to do shell script shellCommand
Not sure perl is the correct unix command to use for this.
Secondly, is it possible to pass a unicode hex number as the
replaceString?
What I'm working towards is a font conversion from a language font with
stacking diacriticals to the unicode equivalent.
What would that shellCommand look like? I read through the archives, a
see there is no way to specify a unicode character by it's hex, but I'm
certain there is in a shell command. (I think it has to do with
declaring standard output as unicode and then print chr (1FFF) or
something?)
Thanks for any help,
Joe Weaks
_______________________________________________
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.