Bash source

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Internal

Overview

source is a bash built in and a synonym for .. Read and execute commands from the file specified as argument in the current shell context. If the name of the file specified as argument does not contain a slash, the PATH variable is used to find filename. When bash is not in posix mode, the current directory is searched if file is not found in $PATH. If any arguments are supplied, they become the positional parameters when file is executed. Otherwise the positional parameters are unchanged. The return status is the exit status of the last command executed, or zero if no commands are executed. If file is not found, or cannot be read, the return status is non-zero.