Re: do shell script - which shell?
Re: do shell script - which shell?
- Subject: Re: do shell script - which shell?
- From: Adrian <email@hidden>
- Date: Sat, 6 Apr 2002 20:48:07 -0500
On Saturday, April 6, 2002, at 04:03 PM, Chris Garaffa wrote:
Hello all,
I've got a little script to manipulate Apache via the apachectl command:
.....
Well, I get the error
"zsh: command not found: apachectl"
Try changing it to /usr/sbin/apachectl thus specifying the complete path.
However, I don't use zsh! My preferred shell in Terminal is tcsh, and it
is set that way...
When you "do shell script ", it always uses zsh. It avoids the Terminal
application completely.
I tried adding this line to the beginning of my script:
do script "tcsh"
with no results...
That will only run tcsh inside zsh, but since it has no input, it will
immediately exit. Commands executed in this way will not persist to the
next "do script". If you really want to use tcsh you could use:
do shell script " echo ' apachectl restart ' | tcsh "
However, most people who write shell scripts prefer not to use tcsh.
Thanks,
Chris
email@hidden
-- Adrian
_______________________________________________
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.