zsh-workers
 help / color / mirror / code / Atom feed
From: <kazda@VNET.IBM.COM> (Mike Kazda)
To: Carlos Carvalho <carlos@riglos.fisica.ufpr.br>
Cc: zsh-workers@math.gatech.edu
Subject: Re: beta 19 cannot run this script
Date: Wed, 5 Jun 1996 14:11:00 -0400	[thread overview]
Message-ID: <9606051811.AA19891@rumor.fishkill.ibm.com> (raw)
In-Reply-To: <m0uRMR2-000031C@riglos.fisica.ufpr.br>

>>>>> "Carlos" == Carlos Carvalho <carlos@riglos.fisica.ufpr.br> writes:
    >>
    >> if [ -z "$APS_BASEDIR" ]; then

    Carlos> I tried this and it doesn't work :-(

    Carlos> Trying with this small version:

#! /bin/sh
if [ -z $APS_BASEDIR ]; then
        APS_BASEDIR=`grep APS_BASEDIR /etc/printcap | cut -d ':' -f 2`
        export APS_BASEDIR
fi

You need to double quote variable otherwise the shell will just
evaluate it and there is no argument as indicated by the shell.  I
think that bash is just a quirk that it works.  Normally, ksh, regular
sh, this will fail, unless you double quote it.

#! /bin/sh
if [ -z "$APS_BASEDIR" ]; then
        APS_BASEDIR=`grep APS_BASEDIR /etc/printcap | cut -d ':' -f 2`
        export APS_BASEDIR
fi

Mike



  reply	other threads:[~1996-06-05 18:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-05 16:59 Carlos Carvalho
1996-06-05 16:03 ` Bart Schaefer
1996-06-05 19:31   ` Carlos Carvalho
1996-06-05 18:11     ` Mike Kazda [this message]
1996-06-05 21:11       ` SOLVED: " Carlos Carvalho
1996-06-05 18:00 Eskandar Ensafi

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=9606051811.AA19891@rumor.fishkill.ibm.com \
    --to=kazda@vnet.ibm.com \
    --cc=carlos@riglos.fisica.ufpr.br \
    --cc=zsh-workers@math.gatech.edu \
    /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).