This article is from Baidu Encyclopedia.
What is a shell.
To be exact, the shell is a command-line interpreter whose function is to interpret the input commands and pass them on to the system, following a certain syntax. It provides users with an interface system-level program that sends requests to Linux to run programs, allowing users to start, suspend, stop, or even write programs with the shell. The shell itself is a program written in C, which is a bridge for users to use Linux. The shell is both a command language and a programming language (what you call a shell script). As a command language, it interactively interprets and executes user-entered commands, and as a programming language, it defines variables and parameters and provides many control structures in higher-order languages, including loops and branches. Although not part of the Linux kernel, it invokes most of the functionality of the system kernel to execute programs, create documents, and coordinate the operation of individual programs in parallel.
What is a shell script.
Shell Script,shell Script and Windows/dos under the same batch processing, that is, with a variety of commands pre-placed into a file, convenient one-time execution of a program file, mainly for the convenience of administrator settings or management. However, it is more powerful than batch processing under Windows and is more efficient than editing programs with other programming programs, after all, it uses commands under Linux/unix. In other words, shell script is a program written using the shell's function, which uses a plain text file, writes some shell syntax and instructions inside, and then uses formal notation, pipeline commands, and data flow redirection to achieve the purpose we want.