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 02:41:19 +0100
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:
1. works
2. fails, I don't know the error message because the script traps the
error (I suppose that it's the same as in 3.)
3. fails with "The command exited with a non-zero status", which means
a shell scripting error - not a particular command's error
This suggests that 1. has broken do shell script until the script
terminates (next "idle" will be a fresh new instance).
For those not familiar, there is indeed no way to trigger "The command
exited with a non-zero status" with do shell script "mkdir" let alone
do shell script "ifconfig".
Steps 2. and 3. run in many other occasions, and as far as I know they
don't break do shell script.
I suppose my problem is to use an interactive command, but I don't
really know what this implies. I'm changing for "ps" instead of "top".
Emmanuel
On Dec 6, 2009, at 1:01 AM, Axel Luttgens wrote:
Le 5 déc. 2009 à 21:50, Emmanuel LEVY a écrit :
I wrote too fast. The culprit is most probably a do shell script
"top": itself works, but all subsequent calls to do shell script
return a "The command exited with a non-zero status" error.
Emmanuel
Hello Emmanuel,
Nice to meet you again.
Yes, it would very be interesting to have the smallest piece of code
liable to reproduce the problem.
I ask because your initial report made me think very hard, without
being sure to have fully understood the symptom you described. But
it's possibly only me... ;-)
TIA,
Axel
_______________________________________________
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