Bird
0
0

Which of the following is the correct syntax to start a here document that disables variable expansion using single quotes?

easy📝 Syntax Q3 of 15
Bash Scripting - Text Processing in Scripts
Which of the following is the correct syntax to start a here document that disables variable expansion using single quotes?
Acat <<'EOF'
Bcat <<"EOF"
Ccat <<EOF
Dcat <<-EOF
Step-by-Step Solution
Solution:
  1. Step 1: Understand quoting effect on variable expansion

    Single quotes around the delimiter disable variable expansion inside the here document.
  2. Step 2: Identify correct syntax

    Using <<'EOF' disables expansion, while unquoted or double quoted delimiters behave differently.
  3. Final Answer:

    cat <<'EOF' -> Option A
  4. Quick Check:

    Single-quoted delimiter disables expansion [OK]
Quick Trick: Use single quotes around delimiter to prevent variable expansion [OK]
Common Mistakes:
MISTAKES
  • Using unquoted delimiter expecting no expansion
  • Using double quotes instead of single quotes
  • Confusing <<- with quoting

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Bash Scripting Quizzes