First, popularize a knowledge point:. (dot space) Mo script file is equivalent to using the source file to execute this script.
SOURCE Command usage:
SOURCE FileName
Function: Reads and executes the commands in the filename under the current bash environment.
Note: This command usually uses the command "." To replace.
such as: source. BASH_RC and. The. BASH_RC is equivalent.
Note: The difference between the source command and the shell scripts is that
Source executes the command in the current bash environment, and scripts starts a child shell to execute the command. This way, if the command to set the environment variable (or alias, etc.) is written into scripts, it will only affect the child shell and cannot change the current bash, so use the source command when setting the environment variable through the file (command column).
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
./(dot slash) with. (dot space) The difference between executing a script file