Linux entry shell programming and hello world!

   Someone once said that learning Linux without shell programming means that you don't understand Linux. To master shell programming, a lot of practice is required. Beginners can use the shell to print hello world and start learning! Shell script programming requires the following rules:

1. The name of the shell script is generally in English, uppercase and lowercase;

2. Special symbols and spaces cannot be used for naming;

3. The shell script suffix ends with .sh;

4. It is not recommended that the shell be pure numbers, generally named after the script function;

5. The first line of the shell script content starts with #! / Bin / bash;

6. Use uppercase letters for the names of variables in shell scripts. You cannot use "-" between letters, you can use "_";

7. Variable names of shell scripts cannot start with numbers or special symbols.

The following is the first shell script, the script name is: first_shell.sh, the code content is as follows:

#! / bin / bash fixed format, define the shell type used by the script;

#This is my first shell # signifies a comment and has no practical meaning, Shell will not parse it

#By author lee represents the script creator, # signifies comments

echo "Hello World!" script main command, execute the script to present content

Published 14 original articles · Likes0 · Visits 414

Guess you like

Origin blog.csdn.net/falnet/article/details/104468136