Write your shell program-general Linux technology-Linux technology and application information. Read the following for details. I think that if I want to learn Linux commands one by one, I may have learned for a long time and feel that I have not learned any knowledge. I have such experiences and feelings. I wrote some posts about learning in Honglian, some of which were my own experiences. Some of them are written based on the guidance of some experts and their own experiences. What I want to write today is my own experience.
Today, I want to write a Shell program in Linux. This is not hard! The only foundation for achieving this condition is that you can open a terminal and a program like notepad in Windows in Linux! Of course, you will use vi and other programs, which is better! Then you write the first command in the "Notepad" program you opened. The first line writes the first parameter of this command, "| more" at the end, and the second line, you write this command again, followed by the second parameter. Add "| more", and so on. If you want to write a few lines, either 10 lines or several lines. Save it and add the suffix ". sh". Some experts say that you can do it without the suffix (without the suffix, I have not tried it. You can try it if you have time !), In the terminal, go to your saved folder and enter your file name. The result is clear to you. In this way, you have a sense of accomplishment. When you learned a command today, you wrote a Shell program. At the same time, after you have learned several commands, you can make several commands into a Shell program, combine these commands to do what you want within the scope of their capabilities. Are you upset?
In this case, I think there are two advantages. First, while learning Linux commands, you learned Part 2. While learning commands, you learned Shell programming. The second advantage is that it enhances your hands-on capabilities and the effect of learning commands. In particular, what can I do? I have a better understanding of your memory and the role of commands. How can I achieve this !?
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service