parsing - Solaris/UNIX passing "$*" to compiled java -


i having strange issue passing "$*" java compiled program. program not parse variables when pass following command line:

/export/home/checkout>/tmp/jsnmp.sh -f noc2 -t 4,4 -x \"resdiag silentdiag 1\",18 

the "/tmp/jsnmp.sh" contains following:

#!/bin/sh  $java_home/bin/java -jar /export/home/checkout/jsnmp.jar $* 

now if run this:

$java_home/bin/java -jar /export/home/checkout/jsnmp.jar \      -f noc2 -t 4,4 -x "resdiag silentdiag 1",18 

everything works.

any ideas folks?

you want maintain quoting within script, use "$@".


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -