• 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 flaw
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: do shell script flaw


  • Subject: Re: do shell script flaw
  • From: Emmanuel LEVY <email@hidden>
  • Date: Sun, 6 Dec 2009 12:53:49 +0100

Here is probably the problem - I expect so.

But - maybe I don't understand what you say - no, I'm not ignoring the output from top. I suppose you can run this in Smile (or any equivalent if you don't have Smile):

do shell script "top -tl 2 -o cpu -p '$aaaaaa $cccc ^bbbbbbbbbbbbbbbb'"

this returns a meaningful result OMM...

Emmanuel


On Dec 6, 2009, at 3:46 AM, Doug McNutt wrote:

At 02:41 +0100 12/6/09, Emmanuel LEVY wrote:
Hi Axel, thanks for tactfully giving me an occasion to make myself clearer.

My script runs on idle. It does:

1. do shell script "top"
2. do shell script "ifconfig"
3. do shell script "mkdir"

Usually it works all right. Sometimes, what I observe is:

The top tool doesn't normally terminate until the user enters CONTROL C.


I thought AppleScript would wait forever for the termination but perhaps it is timing out after an interval that isn't uniform. You are ignoring the output from top. Isn't that what you're looking for? You say it runs all right sometimes. How do you observe the output from top?

Does top have an option to run just once? The info in man top seems to insist on an interactive display on a TTY.
--


--> A fair tax is one that you pay but I don't <--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden

_______________________________________________ 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
References: 
 >Re: Do shell script vs terminal discrepancy (From: airdrummer <email@hidden>)
 >Re: Do shell script vs terminal discrepancy (From: Paul Skinner <email@hidden>)
 >Re: Do shell script vs terminal discrepancy (From: Simon Topliss <email@hidden>)
 >Re: Do shell script vs terminal discrepancy (From: Paul Skinner <email@hidden>)
 >do shell script flaw (From: Emmanuel LEVY <email@hidden>)
 >Re: do shell script flaw (From: Emmanuel LEVY <email@hidden>)
 >Re: do shell script flaw (From: Axel Luttgens <email@hidden>)
 >Re: do shell script flaw (From: Emmanuel LEVY <email@hidden>)
 >Re: do shell script flaw (From: Doug McNutt <email@hidden>)

  • Prev by Date: Re: do shell script flaw
  • Next by Date: Re: do shell script flaw
  • Previous by thread: Re: do shell script flaw
  • Next by thread: Re: do shell script flaw
  • Index(es):
    • Date
    • Thread