title: What does if [[ $? -ne 0 ]]; mean in .ksh
body: <p>I have a following piece of code that says if everything is executed mail a person if it fails mail the person with a error message. </p>
  
  <pre><code>if [[ $? -ne 0 ]]; then
    mailx -s" could not PreProcess files" xyz@abcd.com
  else            
    mailx -s" PreProcessed files" xyz@abcd.com
  fi
  done
  </code></pre>
  
  <p>I am new to linux coding I want to understand what <code>if [[ $? -ne 0 ]];</code> means </p>