I am working with a bash script that is currently running on a server (RHEL4). I am developing on my laptop with Ubuntu 10.04, but I do not think the platform is causing the problem.
Here's what happens: I have a skeleton script that calls another script that does most of the work. However, it calls getConfig.sh calls a lot. getConfig.sh basically just parses some command line argument (using getopts) and calls a Java program to parse some XML files. In any case, getConfig.sh raises a lot of errors (but still seems to work).
Here is the message I receive
getconfig.sh: 89: [[: not found
getconfig.sh: 89: [[: not found
getconfig.sh: 94: [[: not found
I get these three errors every time it starts; however, the script exits and the Java code is executed.
Here's the conditional code section
parseOptions $ *
if [["$ {debugMode}" == "true"]]; then
DEBUG = "- DDEBUG = true"
echo "$ {JAVA_HOME} / bin / java $ {DEBUG} -Djava.endorsed.dirs = $ {JAXP_HOME} -jar $ (dirname $ 0) /GetXPath.jar $ {XML_File} $ {XPath_Query}"
fi Line 89 is "parseOptions $ *" and line 94 is "fi"
Thanks for answers.
source share