What is the effect of quoting the end marker in a here-document?

Study for the OSCP Linux Exam. Use our flashcards and multiple-choice questions to test your skills. Each query comes with detailed hints and explanations to enhance your preparedness. Get ready to conquer the exam!

Multiple Choice

What is the effect of quoting the end marker in a here-document?

Explanation:
Quoting the end marker makes the here-document literal. The shell stops performing expansions on the content, so anything like variables or command substitutions stays exactly as written and is not executed or substituted. This means lines with $VAR or $(cmd) are passed to the command unchanged, preserving literal text. That’s why this option is the best choice: it captures both the prevention of expansions and the exact preservation of the text.

Quoting the end marker makes the here-document literal. The shell stops performing expansions on the content, so anything like variables or command substitutions stays exactly as written and is not executed or substituted. This means lines with $VAR or $(cmd) are passed to the command unchanged, preserving literal text. That’s why this option is the best choice: it captures both the prevention of expansions and the exact preservation of the text.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy