1 Why Study Shell?
- We need to understand the shell program written in operation and maintenance personnel.
- Occasionally write some simple shell program to manage the cluster, to improve development efficiency.
2 Shell Overview
- Shell is a command line interpreter, which receives the application / user command, and then call the operating system kernel.
- Shell is still a quite powerful programming language, easy to write, easy to debug, flexibility.
3 Shell parser
Shell parser 3.1 Linux offers
- grammar:
cat /etc/shells
- Example:
The relationship of 3.2 bash and sh
- grammar:
Cd / Bin
ll | grep -i bash
- Example:
- / Bin / sh is a soft link to / bin / bash is.
3.3 system default shell parser
- grammar:
echo $SHELL
- Example:
- Parser system default shell is / bin / bash.