• 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: 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
  • Follow-Ups:
    • Re: Shell Script Not Working from AppleScript Call
      • From: Rick Gordon <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>)

  • 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