这个脚本增加了一个简单的函数来显示一个消息并带适当的返回码退出,还把所有操作转移到一个for循环中,这使这个脚本看起来更干净、更容易理解了。
By adding a simple function to display a message and exit with the appropriate return code as well as moving everything into a for loop, the script looks cleaner and is easier to understand.
生成一个用于通信完成状态的简单消息框,仅需几行代码,出于方便阅读的目的,如果想创建简单的函数来生成消息,这个代码将最为合适。
For readability purposes, this code will fit best if you create a simple function to generate the message. Doing so requires a total of four lines of code.
应用推荐