如何删除第二个printf
期间发生的重复代码?
当然,必须有一种更有效的方式将>> records.txt
添加到printf
的末尾,而无需再次输入
if(($qs<=99999))
then
printf "${sp[x]} bonus is = £0 for ${qs[i]} QuarterlySales\n"
if [ $save == "y" ]
then
printf "${sp[x]} bonus is = £0 for ${qs[i]} QuarterlySales\n" >> records.txt
fi