I'm creating a script that runs a few commands on some boxes and everything can be logged EXCEPT the java -version command, there doesn't seem to be any output...
Can anyone help explain why this does not work? Do I need to do something extra to append the output from the java -version command to a file on the machine that I am running the script?
Thanks!
SSH_CMD=/usr/bin/ssh
USER=root
for _host in ${LIST_HOSTS}
do
${SSH_CMD} ${USER}@${_host} hostname | tee -a results.txt
${SSH_CMD} ${USER}@${_host} 'java -version'
${SSH_CMD} ${USER}@${_host} 'uname -a' |tee -a results.txt
${SSH_CMD} ${USER}@${_host} 'prtdiag -v | grep -i OBP' |tee -a results.txt
echo "\n" | tee -a results.txt
done
Does anyone know why that the java output would be considered STDER (my wild guess is that the programmers who worked on java had the output go to SDTERR? )