Source (command)
Encyclopedia
source is a Unix command that evaluates a file or resource as a Tcl script
. When a return statement
is reached, the script ends. Some bash scripts should be run using the
Tcl
Tcl is a scripting language created by John Ousterhout. Originally "born out of frustration", according to the author, with programmers devising their own languages intended to be embedded into applications, Tcl gained acceptance on its own...
. When a return statement
Return statement
In computer programming, a return statement causes execution to leave the current subroutine and resume at the point in the code immediately after where the subroutine was called, known as its return address. The return address is saved, usually on the process's call stack, as part of the operation...
is reached, the script ends. Some bash scripts should be run using the
source your-script
syntax, e.g., if they contain a change directory (cd) command and the user intends that he be left in that directory after the script is complete.