LPIC-1 Exam 101 v5 (Linux Administrator) — Question 30

From a Bash shell, which of the following commands directly execute the instructions from the file /usr/local/bin/runme.sh without starting a subshell?
(Choose two.)

Answer options

Correct answer: A, D

Explanation

The commands 'source /usr/local/bin/runme.sh' and '. /usr/local/bin/runme.sh' both execute the script in the current shell environment, thus not creating a subshell. In contrast, running '/usr/local/bin/runme.sh' or '/bin/bash /usr/local/bin/runme.sh' starts a new subshell, and 'run /usr/local/bin/runme.sh' is not a valid command for this context.