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:
cd /class/cm325d/06/dASG5
egrep 'James|Biel|Singlof|Hall|Lele|Kanter|Helms|Sahara|Jerrod|Dixon' asg5f1 > asg5f1c
sed 's/ /:/g' asg5f1c > t1
sed 's/$/:/g' t1 > asg5f1c
sort asg5f1c > t2
sort asg5f2 > t3
join t2 t3 > asg51
cut -d':' -f6 asg51 > gp
cut -d':' -f7 asg51 > np
sed 's/^/z=z+/' gp > gpay
sed 's/^/z=z+/' np > npay
echo "z" >> gpay
echo "z" >> npay
bc -q gpay > tgpay
bc -q npay > tnpay
exit
paste tgpay tnpay > totals
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.