title: Echo Error message in shell script
body: <pre><code>#Note: If you see # in front of any line it means that itâ€™s a comment line not the actual code
  #** ********************************************************************
  FILE_NAME=filename_4.zip
  FILE_LOCATION=/home/testvis/generic
  ENTITY_LIST=ALL
  
  if ${JAVACMD} -classpath $CLASSPATH:$LIB oracle.ucm.idcws.client.UploadTool \
  --url=https://URL_XX/idcws/GenericSoapPort  \
  then
  echo “File Successfully Uploaded”
  else
  echo “Exception Uploaded ”
  exit 0
  fi
  </code></pre>
  
  <p>This is returning the echo section correctly. But  i want the error message which we get in the exception also should be echoed. </p>
  
  <p>Like in PLSQL we have <code>SQLERRM</code>. Do we have a similar variable or any method in shell script ?</p>