We’ve looked at two different methods of outputting our text, both using the
echo command. There is a third way called a here document or here script. A here document is an additional form of I/O redirection in which we embed a body of text into our script and feed it into the standard input of a command. It works like this:
command is the name of a command that accepts standard input and
token is a string used to indicate the end of the embedded text. We’ll modify our script to use a here document:
#!/bin/bash # Program to output a system information page TITLE="System Information Report For $HOSTNAME" CURRENT_TIME=$(date +"%x %r %Z") TIME_STAMP="Generated $CURRENT_TIME, by $USER"
cat << _EOF_<HTML> ...