title: Avoid bash script waiting for user enter the Enter key
body: <p>i got following entry in a bash script.</p>
  
  <pre><code> echo "Please see attached file" | mailx -S smtp=$smtpServer -s "Subject of the mail" -a $logfile -r "sender@domain.com" receiver1@domain.com receiver2@domain.com
  </code></pre>
  
  <p>Its working fine if there is no error in sending mail. but sometimes if there is an error ,mailx will show the error message and wait for user to enter the enter key(carriage return).I want to avoid this.it should not wait for user to enter the enter key . how to do it in bash script ? </p>