Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: #!/path/to/arch-indep/zsh -f
- X-seq: zsh-workers 7993
- From: Clint Olsen <olsenc@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: #!/path/to/arch-indep/zsh -f
- Date: Wed, 22 Sep 1999 01:58:31 -0700
- In-reply-to: <9909220759.AA12437@xxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- Organization: Intel Corporation, Hillsboro, OR
- References: <19990921182350.A45626@xxxxxxxxxxxxxxxx> <9909220759.AA12437@xxxxxxxxxxxxxxxxx>
On Sep 22, Peter Stephenson wrote:
>
> Well, a more specific test would be `[ -x $OTOOLS/bin/$OS/zsh ]', but if
> the file's there, it's likely to be executable. A more likely source of
> problems, particularly if you are passing arguments with spaces in, in
> which case it's a guaranteed source of problems, is our old friend the sh
> word-splitting behaviour: for example, if you do zsh -c 'echo "hello
> there"' the wrapper will actually in effect invoke zsh -c 'echo' '"hello'
> 'there"' (which is bad). To keep your arguments intact, try:
>
> #!/bin/sh
>
> if [ -x $OTOOLS/bin/$OS/zsh ]; then
> exec $OTOOLS/bin/$OS/zsh "$@"
> else
> exec /usr/intel/bin/zsh "$@"
> fi
Ok, I gave this a try. This doesn't seem to be my problem (this time).
What's happening is that *csh is actually trying to run my script and
immediately failing on the first apparent syntax error. It's as if it
won't fire off the interpreter correctly:
#!/afs/pdx/proj/otools/bin/zsh -f
prog=${0##*/}
...
...
~% rlsci
Missing }.
As a test, I tried copying Perl to a directory of my own and running a test
with a perl script thinking it might have something to do with me owning
the interpreter. Evidently that's not it, either. If I eliminate the
wrapper from the equation, it seems to work fine (but then it's not very
portable).
Thanks,
-Clint
Messages sorted by:
Reverse Date,
Date,
Thread,
Author