From a Bash shell, which of the following commands directly executes the instruction from the file /usr/local/bin/runme.sh without starting a subshell? (Please select TWO answers.)
The two correct answers are:
A. source
B. .
Explanation:
A. The 'source' command (or its equivalent '.') is used to execute the contents of a script file within the current shell environment. When you use the 'source' or '.' command, the instructions from the specified file, in this case, '', are directly executed without starting a subshell. The changes made by the script, such as variable assignments or function definitions, will persist in the current shell.
B. Similarly, using the '.' command followed by the path to the script, like '. ', also executes the script within the current shell environment without creating a subshell. The instructions from the script will be executed directly in the current shell.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Strib
6 months, 4 weeks agoBorbz
2 years, 10 months ago