Re: do shell script flaw
Re: do shell script flaw
- Subject: Re: do shell script flaw
- From: Emmanuel LEVY <email@hidden>
- Date: Sun, 6 Dec 2009 17:36:34 +0100
It sure does. Great input, thanks much. Apologies for not having
checked the tech note.
Emmanuel
On Dec 6, 2009, at 4:36 PM, Paul Skinner wrote:
Since top is normally interactive and you don't need that I'd use
the -l flag to run it only once. The tech note for do shell script
even cites this interactive shell app as an example of problems and
limits of these apps.
And I get the same result from...
do shell script "top -tl 2 -o cpu -p '$aaaaaa $cccc
^bbbbbbbbbbbbbbbb'"
as I do from...
do shell script "top -l1 -tl 2 -o cpu -p '$aaaaaa $cccc
^bbbbbbbbbbbbbbbb'"
Does that help the issue?
Paul
On Dec 6, 2009, at 8:37 AM, Emmanuel LEVY wrote:
Sincerely, I think that programming "do shell script" was a tricky
business and using it with "top" unveals some kind of a limit.
Emmanuel
On Dec 6, 2009, at 2:05 PM, Mark J. Reed wrote:
On Sun, Dec 6, 2009 at 6:47 AM, Emmanuel LEVY
<email@hidden> wrote:
Not so sure. If I run do shell script "mkdir foo/bar" (no -p) the
error says
"no such file or directory" - it's an error from the command -
not "The
command exited with a non-zero status".
Ah, I see. So it's exiting with a nonzero status without sending an
error message to stderr. In that case, without redirecting stderr
to
dev null, I can't think of any way to reproduce that. It could occur
if something terminated mkdir before it completed, perhaps, but most
error conditions would yield an error message either from mkdir or
from bash.
--
Mark J. Reed <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
_______________________________________________
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
_______________________________________________
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