From: Clint Olsen <olsenc@ichips.intel.com>
To: zsh-workers@sunsite.auc.dk
Subject: Re: #!/path/to/arch-indep/zsh -f
Date: Wed, 22 Sep 1999 01:58:31 -0700 [thread overview]
Message-ID: <19990922015831.A82900@ichips.intel.com> (raw)
In-Reply-To: <9909220759.AA12437@ibmth.df.unipi.it>
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
next prev parent reply other threads:[~1999-09-22 8:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-22 1:23 Clint Olsen
1999-09-22 7:59 ` Peter Stephenson
1999-09-22 8:58 ` Clint Olsen [this message]
1999-09-22 8:33 ` Peter Stephenson
1999-09-22 16:39 ` Clint Olsen
1999-09-23 16:42 ` Bart Schaefer
1999-09-22 9:13 ` Bart Schaefer
1999-09-22 11:24 ` Owen M. Astley
1999-09-22 16:28 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19990922015831.A82900@ichips.intel.com \
--to=olsenc@ichips.intel.com \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).