bash shell script (bash脚本)中,break是退出一层循环,break 2是退出2层循环(当有相互嵌套时),....
break: break [n]
Exit for, while, or until loops.
Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing
loops.
Exit Status:
The exit status is 0 unless N is not greater than or equal to 1.
脚本中的exit的作用是整个脚本退出了,逻辑上exit之后的命令不再运行。