• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Shell Script Not Working from AppleScript Call
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shell Script Not Working from AppleScript Call


  • Subject: Re: Shell Script Not Working from AppleScript Call
  • From: Rick Gordon <email@hidden>
  • Date: Sun, 24 Aug 2008 13:13:51 -0700

So far, still no luck. Skeeve's last post runs without error, but produces the same result (an empty string) as my version with the unquoted form.

Also, I see that my original post had the value for one of the variables truncated, although it was correct in the long composite string and in my initial explanation.

set vWgetFlags to " -O - -o /dev/null"   --NOT set vWgetFlags to " -O - -o de"

I've also tried changing the output location to stdout or stderr, but still no fix, and /dev/null is what works in the terminal.

Thanks for all the input so far, though. I appreciate it.

Rick Gordon

------------------

On 8/24/08 at 9:58 PM +0200, Skeeve wrote in a message entitled
"Re: Shell Script Not Working from AppleScript Call":

>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'"

--

___________________________________________________

RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________

WWW:   http://www.shelterpub.com
 _______________________________________________
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

  • Follow-Ups:
    • Re: Shell Script Not Working from AppleScript Call
      • From: Skeeve <email@hidden>
References: 
 >Shell Script Not Working from AppleScript Call (From: Rick Gordon <email@hidden>)
 >Re: Shell Script Not Working from AppleScript Call (From: Doug McNutt <email@hidden>)
 >Re: Shell Script Not Working from AppleScript Call (From: Skeeve <email@hidden>)

  • Prev by Date: Re: Shell Script Not Working from AppleScript Call
  • Next by Date: Re: Shell Script Not Working from AppleScript Call
  • Previous by thread: Re: Shell Script Not Working from AppleScript Call
  • Next by thread: Re: Shell Script Not Working from AppleScript Call
  • Index(es):
    • Date
    • Thread