Re: Shell Script Not Working from AppleScript Call
Re: Shell Script Not Working from AppleScript Call
- Subject: Re: Shell Script Not Working from AppleScript Call
- From: Skeeve <email@hidden>
- Date: Sun, 24 Aug 2008 21:58:53 +0200
Doug McNutt schrieb:
AppleScript has "quoted form of" which really helps.
--set vRegex to quoted form of "sed -E 's/^[^0-9]+([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+).*$/\\1/g'"
ought to handle those single quotes and double backslashes which AppleScript is having serious trouble with when it tries to apply them before your shell or sed gets to see them.
But not as you introduced them. Much better is:
set vRegex to "sed -e " & quoted form of "s/^[^0-9]+([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+).*$/\\1/g"
And yes. Quotes will be escaped. Like this: "ain't that nice" becomes
"'ain'\''t that nice'"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden