zsh-users
 help / color / mirror / code / Atom feed
* Re: zsh script can't find zsh binary?
@ 1995-06-27 23:50 Geoff Wing
  1995-06-28  0:39 ` Peter Moore
  0 siblings, 1 reply; 4+ messages in thread
From: Geoff Wing @ 1995-06-27 23:50 UTC (permalink / raw)
  To: zsh-users

: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
-- 
Mason [G.C.W]  mason@werple.mira.net.au     Hurt...Agony...Pain...LOVE-IT


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: zsh script can't find zsh binary?
  1995-06-27 23:50 zsh script can't find zsh binary? Geoff Wing
@ 1995-06-28  0:39 ` Peter Moore
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Moore @ 1995-06-28  0:39 UTC (permalink / raw)
  To: mason; +Cc: zsh-users

> :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@objy.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: zsh script can't find zsh binary?
  1995-06-25 17:20 Jose Unpingco
@ 1995-06-27 10:41 ` Dave Sainty
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Sainty @ 1995-06-27 10:41 UTC (permalink / raw)
  To: zsh-users

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* zsh script can't find zsh binary?
@ 1995-06-25 17:20 Jose Unpingco
  1995-06-27 10:41 ` Dave Sainty
  0 siblings, 1 reply; 4+ messages in thread
From: Jose Unpingco @ 1995-06-25 17:20 UTC (permalink / raw)
  To: zsh-users


Hi,

I have a very simple script. It looks like this..

#!/home/sunshine/grad/unpingco/bin/zsh
echo 'hey'

the script file is listed as...

-rwx--x--x  1 unpingco       50 Jun 25 10:05 cf.zsh*

and the binary for zsh is in

-rwx------  1 unpingco   475136 Jun 24 13:44 bin/zsh*

and the full pathname to zsh is

/home/sunshine/grad/unpingco/bin/zsh

when I try to invoke it on the command line as

zsh> cf.zsh

I get 

zsh: command not found: cf.zsh

I can't figure this.  I've shuffled the permissions every which way and it still
won't work.  Something is weird here. I'm out of ideas.

any help much appreciated.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1995-06-28  0:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-06-27 23:50 zsh script can't find zsh binary? Geoff Wing
1995-06-28  0:39 ` Peter Moore
  -- strict thread matches above, loose matches on Subject: below --
1995-06-25 17:20 Jose Unpingco
1995-06-27 10:41 ` Dave Sainty

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).