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

Re: zsh script can't find zsh binary?



Jose Unpingco writes:

> I have a very simple script. It looks like this..
> 
> #!/home/sunshine/grad/unpingco/bin/zsh
> echo 'hey'
> 
> when I try to invoke it on the command line as
> 
> zsh> cf.zsh
> 
> I get 
> 
> zsh: command not found: cf.zsh

This looks like a classic case of the interpreter exec line being too
long! One of the sillier features of unix lookalikes.

There is usually a limit on how long the #! line can be, 32 characters
or so. The error message always complains it can't find the script
file, not the interpreter. You've passed the length limit. This is a
kernel problem, rather than zsh. :-)

Basically you're stuck. You need to put it in a directory with a
shorter pathname, or use /bin/sh as a bootstrap to run zsh, or run
your script as a zsh function instead.

Bummer eh?

Dave.



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