• 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
Getting values returned by Unix command-line programs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting values returned by Unix command-line programs


  • Subject: Getting values returned by Unix command-line programs
  • From: Rob Lewis <email@hidden>
  • Date: Wed, 17 Mar 2004 20:35:31 -0800

In Applescript, how do you retrieve values returned by Unix command-line programs? The program of interest outputs a space-delimited string of values, which I can retrieve with:

set retval to do shell script "myprog"
set AppleScript's text item delimiters to " "
set newText to text items of retval
set myvar to item 4 of newText

But the developer told me that the program also exits with a value of 0 or 1 depending on its result. How do you pick up this value? _______________________________________________
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.


  • Follow-Ups:
    • Re: Getting values returned by Unix command-line programs
      • From: steve harley <email@hidden>
  • Prev by Date: do shell script and prompts
  • Next by Date: Re: do shell script and prompts
  • Previous by thread: Re: do shell script and prompts
  • Next by thread: Re: Getting values returned by Unix command-line programs
  • Index(es):
    • Date
    • Thread