I have a bash script and inside this bash script I have a JAVARESULT variable like this :
JAVARESULT=`java -cp ... parser_file $file $someextravar`
and what I want is to catch in a log file the stderr and stdout of this result variable.
echo "$JAVARESULT" > $LOG_FILE
but i get only the stdout not the stderr. I tried with :
echo "$JAVARESULT" &> $LOG_FILE
but I don't get the java errors in the log file .
java -cp ... parser_file $file $someextravar &> $LOG_FILE
?