The first part: Shell introduction
Command Interpretation Language programming language
When a user logs on to a Linux system, a shell process is created for that user.
Shell version:
Bourne Shell: A shell developed by Bell Labs that is commonly used by UNIX, is excellent in programming, but
No other shell is excellent in terms of user interaction.
BASH: Is the GNU Bourne Again Shell, the default shell on the GNU operating system, enhanced features on the Bourne shell basis, such as command completion, command history tables, and more
Korn Shell: The development of the Bourne Shell, which is compatible with Bourne shell on most content, integrates
The advantages of the C shell and Bourne shell.
C Shell: The BSD version of Sun's shell, which is similar to the C language and is more suitable for programming than the Bourne shell
Shell Case:
[[Email protected] ~] #vi myshell.sh
#!/bin/sh
echo "Hello,world"
[[Email protected] ~] #chmod u+xmyshell.sh
[[Email protected]~]#./myshell.sh
Hello,world
Part II: Shell Programming Basics
2.1 Shell input and output
2.11 Echo
Echoecho command: Used to display text lines or variable values, or to enter a string into a file
2.12 Read
2.13 Cat and pipe
2.14 Tee
2.15 standard input, output, and error combined standard output and standard error
2.2 Shell Background Execution command
2.3 Quotation marks
2.4 Shell variables, parameters