Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam LFCS topic 1 question 69 discussion

Actual exam question from Linux Foundation's LFCS
Question #: 69
Topic #: 1
[All LFCS Questions]

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.)

  • A. source /usr/local/bin/runme.sh
  • B. . /usr/local/bin/runme.sh
  • C. /bin/bash /usr/local/bin/runme.sh
  • D. /usr/local/bin/runme.sh
  • E. run /usr/local/bin/runme.sh
Show Suggested Answer Hide Answer
Suggested Answer: AB 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Strib
10 months, 1 week ago
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.
upvoted 1 times
...
Borbz
3 years, 2 months ago
Answers are correct. A and B.
upvoted 1 times
...
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.

SaveCancel
Loading ...