[…] into a single line […]
<<EOF
to the first command in your pipeline. If you would like to split your pipeline’s commands into separate lines, you can use braces (that is a list). It also maintains a cleaner structure:# Presuming there is no unusual $IFS value:
{
# The first item without a preceding space character.
read line
printf '%s' "${line}"
# Additional list items with a separating space character inserted.
while read line
do
printf ' %s' "${line}"
done
# Terminating newline character.
printf '\n'
} << 'EOT' > list
abc
xyz
EOT