Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: How do I change the subshell to something other than /bin/sh?



"Julio Garcia" wrote:
> My problem is this. I am trying to run some scripts that I cannot change 
> which assume capabilities found in bash. I know that zsh will execute them 
> correctly as well. However, when I just invoke them from the zsh command 
> line, they run under /bin/sh and fail. For example, I have a test script 
> that looks like this:
> 
> logsol10-1 ~ > cat x.sh
> 
> echo $0
> 
> ps

If you really can't change the script (and hence can't add a #! line),
you are stuck with running "zsh ./x.sh" wherever you call the script, or
some equivalent of that.  The decision about which interpreter to run
for a file that isn't executable is made by the operating system, so
the's no way of changing it at the user level.  So the question is
really about how you're calling the script and how much you can change
at that point.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



Messages sorted by: Reverse Date, Date, Thread, Author