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

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.

  • Follow-Ups:
    • Re: do shell script - which shell?
      • From: Chris Garaffa <email@hidden>
References: 
 >do shell script - which shell? (From: Chris Garaffa <email@hidden>)

  • Prev by Date: Newbie question -Applescript and Filemaker problems
  • Next by Date: Re: do shell script - which shell?
  • Previous by thread: do shell script - which shell?
  • Next by thread: Re: do shell script - which shell?
  • Index(es):
    • Date
    • Thread