title: Is there a way to automate the return key after a linux script command?
body: <p>I am using the line below in my script
  <code>add-apt-repository ppa:webupd8team/java</code>
  When it is run from the script I get a prompt to press [return] to confirm adding the source to the repositories</p>
  
  <p>Can I automate that return?</p>
  
  <p>Secondly, I am installing oracle-java7-installer and there is a license agreement that prompts for the user to:
  1.. OK the License agreement
  2.. select YES to Accept License Terms</p>
  
  <p>Can I automate the OK and automate the keypad left &amp; OK to Accept License Terms?
  This script is for testing locally and I do want the script to pause for these user inputs each time.</p>
  
  <p>I have seen this method of piping YES to a command:
  <code>yes | &lt;command here&gt;</code></p>
  
  <p>I am hoping there is a similar method to automate these steps...</p>