Bash syntax error: "[[: not found" -
I am working with a bash script which is currently working 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's happening :. I call the baseline script that makes the most of the work that is another script. However, this conflicts. Calls for getting a lot. GetConfig.sh basically parses some command line arguments (using getopts) and calls the Java program to parse some XML files. Anyway, getConfig.sh is throwing lots of errors (but still seems to work).
Here is the message that I am getting
getconfig.sh: 89: [[: Not foundI think every time it runs three errors; However, the script is complete and the Java code runs.
getconfig.sh: 89: [: Not found
getconfig.sh: 94: [[: Not found
Here is the relayren 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 is 89" parseOptions $ * and line 94 is "Internet"
Thanks for the reply.
< Div class = "after text" itemprop = "text">
Your script is executable and you are implementing it like .get.cs
, the first line of your script Needs:
without the hut line, enter your script sh
Which does not 'will be interpreted as' Understanding the details' in [[
] .
Otherwise, if you want to get your script to bash getconfig Sh
should run like, strong> not sh getconfig.sh
. Even if your default shell is bash, run with the script sh
In order to use a lesser set of party features, use more compliance with POSIS standard. [[
is one of those features which ab abled.
Comments
Post a Comment