Hello,
I've got a script that does the following:
JAVA=/usr/bin/java
JAVA_W_CLASSPATH="$JAVA -cp \"$classpath\" "
$JAVA_W_CLASSPATH com.choicestream.foo
echo $JAVA_W_CLASSPATH
I've noticed that on different versions of bash, it behaves differently.
Bash 3.0 will execute:
/usr/bin/java -cp "/path/to/classes" com.choicestream.foo
And display the same.
But Bash 3.1 and 3.2 put single quotes around the double quotes when
executing.
/usr/bin/java -cp '"/path/to/classes"' com.choicestream.foo
But it will display:
/usr/bin/java -cp "/path/to/classes" com.choicestream.foo
I don't understand the reason for the discrepancy, and searching for "bash
quotes" gives me a lot of bash.org nonsense.
Thanks!
--
Matt Kane : mkane@choicestream.com
AIM: mkbatwerk