Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



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

Answer

.

^^ 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

Answer
?

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

Answer

.

^^ 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"

20. Advanced Shell Scripting
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

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.