"Matt Kane" <[EMAIL PROTECTED]> writes: > 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
There is no difference between the versions, the executed command is always the same. If you want the quotes to be reinterpreted you need to use eval. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash