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.)
B. The command ". /usr/local/bin/runme.sh" (or its equivalent, ". ./runme.sh") is a Bash built-in command that directly executes the instructions in the specified script without starting a subshell. This is also known as sourcing the script, and it allows any variables or functions defined in the script to be available in the current shell.
The command source /usr/local/bin/runme.sh executes the commands in the file /usr/local/bin/runme.sh within the current shell environment.
Here's a breakdown of what each part of the command does:
source is a Bash built-in command that reads and executes commands from a specified file in the current shell environment. It is also equivalent to the "." (dot) command in Bash.
/usr/local/bin/runme.sh is the path and filename of the script to be executed.
When you run the source command with a script file as an argument, the commands in the script are executed as if you had typed them directly into the terminal. This means that any changes to the environment made by the script (such as setting environment variables or defining functions) persist after the script has finished executing, and they are available in the current shell environment.
upvoted 1 times
...
...
This section is not available anymore. Please use the main Exam Page.LX0-103 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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.
linux_admin
2 years, 2 months agolinux_admin
2 years, 2 months ago