• 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: Do Shell Script returns empty string but works in Terminal
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Do Shell Script returns empty string but works in Terminal


  • Subject: Re: Do Shell Script returns empty string but works in Terminal
  • From: Bob Stern <email@hidden>
  • Date: Wed, 02 Aug 2017 22:54:10 -0700

> On Aug 2, 2017, at 10:03 PM, Shane Stanley <email@hidden> wrote:
>
> The problem appears to be that the binary is returning the result you want to
> standardErr, not standardOut.

Thanks — that was it!

I fixed it by appending 2>&1 to the do shell script command, which merges
stderr with stdout, as recommended in this technote on do shell script:
https://developer.apple.com/library/content/technotes/tn2065


> It probably wouldn't hurt to ask the developers why they're doing it this
> way...

I’ll point out the error to him.  However, he hates Cocoa programming.  (He
does embedded systems programming for Intel in his day job.)

Bob Stern
 _______________________________________________
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: Do Shell Script returns empty string but works in Terminal
      • From: Shane Stanley <email@hidden>
References: 
 >Do Shell Script returns empty string but works in Terminal (From: Bob Stern <email@hidden>)
 >Re: Do Shell Script returns empty string but works in Terminal (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Do Shell Script returns empty string but works in Terminal
  • Next by Date: Re: Do Shell Script returns empty string but works in Terminal
  • Previous by thread: Re: Do Shell Script returns empty string but works in Terminal
  • Next by thread: Re: Do Shell Script returns empty string but works in Terminal
  • Index(es):
    • Date
    • Thread