cat
with a here document allows to create a file: cat > /tmp/tq84.file << EOF Lorem ipsum dolor sit amet, consectetur adipiscing elit. EOF
read
and a while
loop to iterate over the lines of a here document: #!/bin/bash while read line; do echo "line = $line" done << EOF first line second line third line EOF
#!/bin/bash cat <<-EOF All lines in this here document start with spaces. The dash in front of the EOF does not remove them. EOF echo -e "\n---------------\n" cat <<-EOF The lines in this here document start with a tabulator. The dash in front of the EOF removes them. EOF