title: how to insert ctrl+d into my linux script?
body: <p>I want to make the following commands:</p>
  
  <blockquote>
    <p>cat > template.txt
    [enter in the terminal]
    text
    [Ctrl+d in the terminal]</p>
  </blockquote>
  
  <p>in a script.</p>
  
  <p>Is there a way to tell the script to do enter\Ctrl d?
  Is there a way to create a file and write to it in script?</p>
  
  <p>I didn't find anything that worked for me.</p>
  
  <p>Thanks.</p>