title: Exitting bc in UNIX script
body: <p>I have to write a script with the bc command, and in doing so I am supposed to exit the bc without any input from the user. So basically the program will still run after the bc is used without waiting for input from the user like my program is currently doin. Here is the code:</p>
  
  <pre><code>cd /class/cm325d/06/dASG5
  
  egrep 'James|Biel|Singlof|Hall|Lele|Kanter|Helms|Sahara|Jerrod|Dixon' asg5f1 &gt; asg5f1c
  sed 's/ /:/g' asg5f1c &gt; t1
  sed 's/$/:/g' t1 &gt; asg5f1c
  sort asg5f1c &gt; t2
  sort asg5f2 &gt; t3
  join t2 t3 &gt; asg51
  cut -d':' -f6 asg51 &gt; gp
  cut -d':' -f7 asg51 &gt; np
  sed 's/^/z=z+/' gp &gt; gpay
  sed 's/^/z=z+/' np &gt; npay
  echo "z" &gt;&gt; gpay
  echo "z" &gt;&gt; npay
  bc -q gpay &gt; tgpay
  bc -q npay &gt; tnpay
  exit
  paste tgpay tnpay &gt; totals
  </code></pre>
  
  <p>Obviously exit isn't working but I cannot figure out what to do I looked up online it says either quit or exit. I tried both and nothing. Any help would be appreciated. Thanks.</p>