#!/usr/bin/env bash
INPUT1=foo
INPUT2=bar
EOL=$'\n'
echo "First approach"
cat - <<< "${INPUT1}${EOL}${INPUT2}${EOL}"
echo
echo "Second approach"
cat - <<< "$INPUT1"$'\n'"$INPUT2"$'\n'
IyEvdXNyL2Jpbi9lbnYgYmFzaApJTlBVVDE9Zm9vCklOUFVUMj1iYXIKRU9MPSQnXG4nCgplY2hvICJGaXJzdCBhcHByb2FjaCIKY2F0IC0gPDw8ICIke0lOUFVUMX0ke0VPTH0ke0lOUFVUMn0ke0VPTH0iCmVjaG8KZWNobyAiU2Vjb25kIGFwcHJvYWNoIgpjYXQgLSA8PDwgIiRJTlBVVDEiJCdcbiciJElOUFVUMiIkJ1xuJw==