Forrest logo
back to the . tool

source:tldr:e2a63

source: Evaluate contents of a given file (alternatively replacing `source` with `.`).
$ . ${filename}
try on your machine

The command ". ${filename}" is used to source a shell script file in the current shell session.

In Unix-like operating systems, the "." or "source" command is used to read and execute the contents of a file within the current shell environment, rather than launching a new subshell. It allows the current shell to interpret and run the commands present in the specified file.

In this particular command, "${filename}" is a variable that holds the name or path of the file to be sourced. By using the dot and space right before the variable, the script file is sourced in the current shell session.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the . tool