exam questions

Exam LFCS All Questions

View all questions & answers for the LFCS exam

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 (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Strib
6 months, 4 weeks 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
2 years, 10 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago