I use the command like this
deploy.sh "argu ment 1".
but the program prompt it receive 3 argument than 1.
date >> ../../logs/cif_deployment.out
date >> ../../logs/cif_deployment.err
java -Xbootclasspath/p:lib/xalan-2.6.0.jar:lib/xercesImpl-2.6.2.jar:lib/xml-apis-1.2.01.jar -Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser -Dlog4j.configuration=log4j_deployment.properties -classpath $CIF_CLASSPATH com.core.cif.deploy.DeployTool $1 $2 $3 >> ../../logs/cif_deployment.out 2>> ../../logs/cif_deployment.err
is there any mistake I make?
To make it work you have to put the double quote inside your script when calling the java class.
The weakness of above script is it will wrapped all your arguments into one,
or you can code it like before
If you are VERY SURE there will always be 3 arguments, because is you do not pass enough arguments..the double quotes in the above script will pass empty string to your java program as argument...so your java program will always have 3 arguments.
I hope that make sense.