Linux Foundation Certified System Administrator (LFCS) — Question 22

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

Answer options

Correct answer: A, B

Explanation

The commands in options A and B, 'source /usr/local/bin/runme.sh' and '. /usr/local/bin/runme.sh', execute the script in the current shell environment, hence they don't create a subshell. Options C and D execute the script in a new shell, while option E is not a valid command for executing scripts.