Introduction to shell

What is a shell?
Shell is a bridge between users and the Linux operating system
. There are many kinds of shells in Linux. Here we are learning bash, which is Bourne Again Shell 1: Bash
is widely used in daily work because of its ease of use and free.
It is the default shell of most Linux systems. The format filename suffix of shell files is usually .sh #!/bin/bash #here is a comment In general, people do not distinguish between Bourne Shell and Bourne Again Shell, so, here, we can see #!/bin /bash, which can also be changed to #!/bin/sh. The common method of script execution a.sh 1. In this case, you need to ensure that the script has execution authority and there is (.) in the environment variable PATH, so that ./a.sh will be searched from the current directory during execution. 2. Just ensure that the script is You can execute /usr/local/a.sh with execution authority 3. As long as you ensure that the script has execution authority , bash a.sh can be executed directly, and even the first line in this script file can not be introduced into /bin/bash, It is executed by passing hello.sh as a parameter to the sh (bash) command


















Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326258770&siteId=291194637