strange "do shell script" failure
strange "do shell script" failure
- Subject: strange "do shell script" failure
- From: Bill Briggs <email@hidden>
- Date: Sat, 5 Feb 2005 17:56:05 -0400
I've got a strange situation with a script that runs on one Mac and
fails on a second one, for reasons I can't seem to determine. I'm
looking for clues.
The script works fine on my Mac (10.3.7 on a TiPB), but I just tried
to run it on a colleague's 15 in. AlPB (also running 10.3.7) and it
failed to work.
It failed at the first "do shell script" command, and the error
message made no sense to me. It said something like this
- error at c1: found EOF while looking for `"
I'm going from memory, and it was an hour ago, so the first part of
that may be wrong, but the last part is right.
I tried some tests, and the results were odd. I could run the failing
command from Terminal on his Mac and it worked as expected (with
appropriate escape characters removed when in Terminal). I could run
do shell script "echo \"hello world\""
from his Script Editor and it worked, but the more complex expression
I could successfully run in Terminal would not run as a do shell
script issued from an AppleScript script. The shell command was run
as super user (sudo) with the administrator password passed in the
command.
I carefully verified that the text string is not missing any quotes,
escapes, or other characters. The exact same script works flawlessly
on my Mac. I'm left wondering why a do shell script command that
works on mine doesn't work on his, when the command works in Terminal
on both Macs.
If it were some bug in the AppleScript I wrote, well, that would be
normal, and I'd just debug and fix it, but the fact that it's messing
up with the shell command is more disconcerting than one of my home
grown bugs. It looks like some kind of problem outside of the script
code (or it should fail on my Mac too).
Anybody got a clue why a command that runs from Terminal on his Mac
would fail when issued as a "do shell script", and what that error
message might indicate? I've checked all quotes and escaped quotes,
and isolated the shell command into a single line script where it was
compared char by char with the working version on my PowerBook and
there is no stray character issues.
- web
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden