Question

In linux, if you have shell script called test.sh and you want it executed IN THE CURRENT SHELL, such that the variables/environment variables set by that script are preserved in the current/originating shell, you can either do:

source test.sh

or, alternatively

[...] test.sh

.

^^ single dot, followed by space

^^^ the use of this is e.g. if you do ". test.sh" and test.sh sets variable X=2, then in the originating/current shell, X is now set, even after test.sh finishes running.

Question

In linux, if you have shell script called test.sh and you want it executed IN THE CURRENT SHELL, such that the variables/environment variables set by that script are preserved in the current/originating shell, you can either do:

source test.sh

or, alternatively

[...] test.sh

?

Question

In linux, if you have shell script called test.sh and you want it executed IN THE CURRENT SHELL, such that the variables/environment variables set by that script are preserved in the current/originating shell, you can either do:

source test.sh

or, alternatively

[...] test.sh

.

^^ single dot, followed by space

^^^ the use of this is e.g. if you do ". test.sh" and test.sh sets variable X=2, then in the originating/current shell, X is now set, even after test.sh finishes running.

If you want to change selection, open document below and click on "Move attachment"

ption, consult bash (1). : A single colon by itself does nothing. It is useful for a no operation'' line such as: 5 if <command> ; then : else echo "<command> was unsuccessful" fi <span>. filename args ... A single dot is the same as the source command. See below. alias command = value Creates a pseudonym for a command. Try: alias necho="echo -n" necho "hello" Some distributions alias the

Summary

status measured difficulty not learned 37% [default] 0

No repetitions