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. :-)
> 
> This isn't the problem here.  The limit is 64 characters, and the message for
> exceeding this is: "exec format error". (It has nothing to do with the kernel)
> Another possibility could be that the program's not in his path, and he should
> do ./cf.zsh

On which platform?  On a Sun4 (SunOS 4.1.3) the limit is 32 characters
and the error message from zsh is without an explicit path for the
executable is:

    zsh: command not found: fog

And the error you get with an explicit path is:    
    
    zsh: no such file or directory: ./fog


Peter Moore
peter@xxxxxxxx



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