In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
The purpose of this article is to share with you the content of an example analysis of SHELL programming Mini Program. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Shell script example: (find the sum of 1 to 100)
# vi qiuhe.sh
#! / bin/sh # symbol #! Used to tell the system that the following parameters are the program used to execute the document
Astat1 # defines variables
Sum=0
While [$a-le 100] # while loop where-le means less than or equal to
Do
((sum=sum+a))
((a=a+1))
Done
Echo $sum
Save exit after writing wq.
# chmod + x qiuhe.sh (add executable permissions)
Several relational operators are referenced in the drawings:
When executing the script, you can use the following two methods, with reference to the attached drawing.
This summation can also be realized in one sentence.
# echo | awk'{for (item1teri)
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.