When creating a file example
in a bash script, you can use cat
and a here document with EOF
as delimiter:
cat <<EOF > example
1234
ABCD
EFGH
EOF
This looks quite complicated to a bash newbie, so would there be a clearer version to write this code?