First, shell overview
1. Overview
command-line interpreter (shell, which is our operating interface), the computer only knows 0101 binary, we need to use the ASCII table to translate
The more official explanation is:
The shell is a program written in C that is a bridge for users to use Linux. The shell is both a command language and a programming language.
A Shell is an application that provides an interface through which users access the service of the operating system kernel.
2.shell classification
- Bourne Shell (/usr/bin/sh or/bin/sh)
- Bourne Again Shell (/bin/bash)--Standard Shell,bash
- C Shell (/USR/BIN/CSH)
- K Shell (/usr/bin/ksh)
- Shell for Root (/sbin/sh)
- ......
Second, the script execution mode
Let's start with a few related commands:
1. output command :Echo
Example 1:
the-e option allows you to control the format by using control characters :
Example 2:
Other echo features, such as output hex, output color, etc. are not expanded here
First shell script
#! is a contract tag that tells the system what interpreter the script needs to execute, even if it uses a Shell.
The second line is a comment, followed by the script content, here is the output
Linux entry fourth day--shell basics