From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: Clint Olsen <olsenc@ichips.intel.com>,
zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Re: #!/path/to/arch-indep/zsh -f
Date: Wed, 22 Sep 1999 09:59:25 +0200 [thread overview]
Message-ID: <9909220759.AA12437@ibmth.df.unipi.it> (raw)
In-Reply-To: "Clint Olsen"'s message of "Tue, 21 Sep 1999 18:23:51 DFT." <19990921182350.A45626@ichips.intel.com>
Clint Olsen wrote:
> Hello:
>
> FYI, I'm using zsh-3.1.6.
>
> I decided to change my script to reflect the copy of my shell, and attempt
> to direct it to the path of my zsh wrapper itself causes the script to
> misfire when it is executed from *csh. I've narrowed it down to a machine
> independent wrapper I have which seems to be hampering starting the
> interpreter. It is:
>
> #!/bin/sh
>
> if [ -f $OTOOLS/bin/$OS/zsh ]; then
> exec $OTOOLS/bin/$OS/zsh $*
> else
> exec /usr/intel/bin/zsh $*
> fi
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
--
Peter Stephenson <pws@ibmth.df.unipi.it> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
next prev parent reply other threads:[~1999-09-22 8:42 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 [this message]
1999-09-22 8:58 ` Clint Olsen
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=9909220759.AA12437@ibmth.df.unipi.it \
--to=pws@ibmth.df.unipi.it \
--cc=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).