In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
Today, I will talk to you about why you want to learn Shell. Many people may not know much about it. In order to let you know more, Xiaobian summarized the following contents for you. I hope you can gain something according to this article.
To learn something, most of us are thinking in the practical direction. From a work perspective, Shell learning is to improve our own work efficiency, improve output, and let us accomplish more things in less time.
Why learn Shell?
Many people will say that Shell programming belongs to the knowledge of operation and maintenance, and it should be done by operation and maintenance personnel. We do not need to learn back-end development. I think this statement is wrong. Compared to those who specialize in Linux operations, we have lower requirements for Shell programming than they do, but shell programming is also something we must master!
Currently, the most popular OPS automation languages under Linux are Shell and Python.
Between the two, Shell is almost an operation and maintenance automation programming language that IT enterprises must use, especially in the service monitoring, business rapid deployment, service start and stop, data backup and processing, log analysis and other links in the operation and maintenance work, Shell is indispensable. Python is more suitable for handling complex business logic, developing complex operation and maintenance software tools, and implementing web access. Shell is a command interpreter that interprets and executes commands and programs entered by the user. An interactive mode of conversation in which a command is entered and immediately responded to.
Knowledge of shell programming is also a requirement for most Internet companies to hire back-end developers.
What is Shell?
Simply put,"Shell programming is the logical processing of a bunch of Linux commands."
HelloWorld in Shell Programming
Make scripts executable: chmod + xhelloworld.sh
helloworld.sh reads:
#!/ bin/bash#The first shell Mini programs,echo is the output command in Linux. echo"helloworld! "
The #symbol in the shell indicates comments. The first line of shell is special, usually with #! Start by specifying the shell type to use. In linux, besides bashshell, there are many versions of shell, such as zsh, dash, etc. But the bashshell is still the one we use the most.
Run script:./ helloworld.sh。(Note that it must be written.) helloworld.sh, Not helloworld.sh, Run other binary programs the same, Write helloworld.sh directly, Linux system will go to PATH to find if there is no helloworld.sh, And only/bin,/sbin,/usr/bin,/usr/sbin and so on in PATH, Your current directory is usually not in PATH, So write helloworld.sh will not find the command, To use./ helloworld.sh tells the system to look in the current directory.)
After reading the above, do you have any further understanding of why you want to learn Shell? If you still want to know more knowledge or related content, please pay attention to the industry information channel, thank you for your support.
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.