[Solved] When can I run a shell script with command “. shellscript” in bash,ubuntu?


The Bash shell searches the directories listed in the PATH variable in both shellscript and . shellscript cases. The main difference is that when using . (or equivalently source) to start a script, a new shell process is not created for interpreting the script. This is sometimes useful because it allows the script to define environment variables and functions that will then be available in the caller. For more details, see the Bash manual page (info bash).

6

solved When can I run a shell script with command “. shellscript” in bash,ubuntu?