• 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: echoing multi-lines output from "do shell script"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: echoing multi-lines output from "do shell script"


  • Subject: Re: echoing multi-lines output from "do shell script"
  • From: Andrew Oliver <email@hidden>
  • Date: Sun, 30 May 2004 13:20:35 -0700

I think Apple's technote on using 'do shell script' answers this one for
you:

http://developer.apple.com/technotes/tn2002/tn2065.html

> Q: My script will produce output over a long time. How do I read the results
> as they come in?
>
> A: Again, the short answer is that you don't - do shell script will not return
> until the command is done. What you can do, however, is to put the command
> into the background (see the next question), send its output to a file, and
> then read the file as it fills up.


On 5/30/04 12:42 PM, "Richard Covert" <email@hidden> wrote:

> I have an UNIX command that shows progress by echoing multiple lines to
> stdout.
> How do I get AS to read each line as it is produced??
>
> I could do a work around by redirecting stdout to a text file and then
> write an AS handler to
> loop on that file until I read a line containing text indicating that
> the UNIX command has completed.
> But then I would have to delete that temporary file.
>
> Does anyone have a better way of monitoring stdout/stderr after issuing
> a "do shell script" AS statement??\
>
> thanks
> _______________________________________________
> 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.
_______________________________________________
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.


References: 
 >echoing multi-lines output from "do shell script" (From: Richard Covert <email@hidden>)

  • Prev by Date: echoing multi-lines output from "do shell script"
  • Next by Date: Monitoring the activity of a text file via AS
  • Previous by thread: echoing multi-lines output from "do shell script"
  • Next by thread: Re: echoing multi-lines output from "do shell script"
  • Index(es):
    • Date
    • Thread