break:退出循环,
return:只退出函数,不退出脚本
exit : 退出脚本
注:在cat a.txt | while read line do ... done 循环形式中只退出循环。要在while read line循环中结束shell,则用 while read line do ... done < a.txt
break:退出循环,
return:只退出函数,不退出脚本
exit : 退出脚本
注:在cat a.txt | while read line do ... done 循环形式中只退出循环。要在while read line循环中结束shell,则用 while read line do ... done < a.txt