delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/01/17/18:45:05

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4B53A0DC.5050708@gmail.com>
Date: Sun, 17 Jan 2010 15:44:28 -0800
From: brian <brw314 AT gmail DOT com>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: newbie bash variable problem
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Hi,

This obviously isn't specific to cygwin, I don't think.

I am trying  to run some bash scripts in cygwin

$JAVA_HOME is the env variable which  I can echo from the script as  
/cygdrive/c/jdk1.6.0_16

but the script sets

JAVA=$JAVA_HOME/bin/java/

I want to see if this is set right so I set an echo this in the script

echo JAVA

but this just gives "JAVA"

and this

echo $JAVA

/bin/java/c/jdk1.6.0_16

which some how over writes part of the variable.

What is the right way to set and to echo the JAVA variable?

Thanks
Brian



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019