System Management
A Bash script writes a configuration block with cat <<EOF inside an indented if statement. The closing EOF is indented with tab characters, so the shell never finds the delimiter and warns that the here-document ended at end-of-file. Which change fixes the problem while keeping the indentation?
Show the answer
Correct answerA. Change << to <<- so leading tabs are stripped
The <<- operator strips leading tab characters from the body and from the closing delimiter, so an indented delimiter is recognized. Quoting the delimiter only disables variable expansion and does not affect how the closing line is matched.