Bash - Source - Built-in command

Bash Liste Des Attaques Ovh


The source command and the point '.' are similar:

Read and execute commands from filename in the current shell environment and return the exit status of the last command executed from filename.

The return status is the status of the last command exited within the script (0 if no commands are executed), and false if filename is not found or cannot be read.


. filename [arguments]
source filename [arguments]


  • Bash - (Argument|Positional Parameter). If any arguments are supplied, they become the positional parameters when filename is executed. Otherwise the positional parameters are unchanged.
  • filename is the file to execute.
    • PATH environment variable: If filename does not contain a slash, file names in PATH are used to find the directory containing filename. The file searched for in PATH need not be executable.
    • When bash is not in posix mode, the current directory is searched if no file is found in PATH.


PATH and shopt

If the sourcepath option to the shopt builtin command is turned off, the PATH is not searched.


source ./.bash_profile

is the same as

. ./.bash_profile

Discover More
Bash Liste Des Attaques Ovh
Bash - (Environment) Variable

A variable is a parameters referenced by a name. parameter A variable has: a value and zero or more attributes (such as integer, ...). Attributes are assigned using the declare builtin command....
Bash Liste Des Attaques Ovh
Bash - Builtin Commands

builtin refers to: a builtin command. See or to the specific builtin command. See (useful when defining a function whose name is the same as a shell builtin) The builtin command execute the specified...
Bash Liste Des Attaques Ovh
Bash - Caller - Stack Trace (Builtin command)

Caller is a builtin command that returns the context (localization) of any active subroutine call (a shell function or a script executed with the . or source builtins. The current frame is frame...
Bash Liste Des Attaques Ovh
Bash - Dot

A dot in bash can be: a builtin command which is an alias of the source command. the current directory in a path
Bash Liste Des Attaques Ovh
Bash - Return - (Function|Shell) exit

Return is a bash builtin function that causes to update the exit status specified by n. Return is intended to be used only for signaling errors, not for returning the results of function. If used:...
Bash Liste Des Attaques Ovh
Bash - Script

This page is Os Shell scripts (with a accent on the Bash shell) A Bash or Shell Script is a text file that: has a shebang has the executable permission. File extensions are meaningless in UNIX,...
Bash Liste Des Attaques Ovh
Bash - Script Execution

script execution
Bash Liste Des Attaques Ovh
Bash - Subroutine (Stack)

A subroutine (in the call stack) is a shell function or script executed with . or source
Bash Liste Des Attaques Ovh
Bash - process

This article is the bash Process. To see how to manage another general linux process, see The process running the command is created. The process inherits the stdin, stdout, and stderr from...
Bash Liste Des Attaques Ovh
Sh - Special Characters

special character See also: special Parameters the point: >, >>, |, < : the tilde (~): the user directory home $?: the exist status $$: the PID of the parent process ...

Share this page:
Follow us:
Task Runner