In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Do not know how to use linux's break command to end a for while or until loop? In fact, it is not difficult to solve this problem. Let the editor take you to learn how to solve it. I hope you will gain a lot after reading this article.
The break command is used to end the for,while or until loop, and you can specify how many layers of the loop to exit.
Syntax format: break [parameters]
Common parameters:
Reference exampl
The default value of the optional parameter n for break is 1:
For ((jumb3witj > 0positanjmur-)); do for ((item3bomi > 0polii -)); do if ((juniors 2)); then break fi printf "% s% s\ n" ${I} ${j} done done # output result 3 3 2 3 1 3
When n is 2: exit the two-tier loop and end:
For ((item3teri > 0poliimuri -)); do for ((jumb3terj > 0positjmuri -)); do if ((jackfruit 2)) Then break 2 fi printf "% s% s\ n" ${I} ${j} done done # output result 3 3 Thank you for reading this article carefully. I hope it is helpful for the editor to share and use linux's break command to end the for while or until cycle. At the same time, I also hope you can support us, pay attention to the industry information channel, find the problem, and the detailed solution is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.