[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Interactive Script works different than File Script
From: |
Ed Padin |
Subject: |
RE: Interactive Script works different than File Script |
Date: |
Tue, 6 Nov 2001 17:24:00 -0500 |
Hmmm.. I get the expected behavior with 'GNU bash, version 1.14.7(1)'
the results are the same both interactive and scripted
Try this:
echo ${OPENJMS_HOME}/lib
I've found that surrounding variable names with curly brackets helps
to distinguish them.
-----Original Message-----
From: bug-bash-admin@gnu.org [mailto:bug-bash-admin@gnu.org]On Behalf
Of Wilkinson, Robert
Sent: Tuesday, November 06, 2001 3:34 PM
To: bug-bash@gnu.org
Subject: Interactive Script works different than File Script
I have been tearing my hair out for days tring to solve this problem
and I have tried all my available avenues. I hope you can and will
help.
When I use the following in a script
#! /bin/sh
OPENJMS_HOME="/usr/java/openjms-0.7"
echo $OPENJMS_HOME/lib
I get the following output "/lib/java/openjms-0.7"
In other words the first 4 characters of the variable are replaced by
the string following the variable in the echo command
I would have expected "="/usr/java/openjms-0.7/lib" which is what I
get when I execute this interactively.
The Version number is 1.14.7(1)[0]