read takes one line, unless you muck with env I suppose, and puts the first field in the first variable and so on with the rest in the last variable. Apparently the version is the 3rd field of the first line. The cat is lazy, read <file is cheaper than a fork, pipe, exec of cat.
<< is a converter of script lines to stdin, and stops on a line with the following token only. The script lines are expanded for variables and such, so I prefer echo '...'|, where single quotes keep things literal. << copies the processed lines to a temp file, so it is the cost of a temp file create versus a pipe, echo being a builtin.
"echo 1 2| read a b c" means a=1, b=2, c=, garbage in is garbage out.
It is just a string, a token made up by the author. I use <<!, if I use it at all, as it takes less space and works fine. Must be exactly and only on a line by itself. Nice to keep lists one item a line for easy maintenance and viewing, not "a b ccc ddd ee ff ggg". You deserve neat, clean, clear code.
This is a Shell "Here" document. All the ensuing lines up to but not including the string $END$ are presented on the input read channel of the program $AMS/bin/procmon .
There should be a corresponding $END$ in column 1 a number of lines later in the script.
Yeah, interview answer, here document. The token can be anything, 'EOF' is very popular.
The $ are a real bad token character choices, normally being used in shell and environmental variable retreivals. The make it look magic, ooooh, ooooh, Levitosa, accio broom!
It looks that your ksh is not ksh. If your ksh is ksh then output is 12.2L01. Also zsh give result 12.2L01. But all other about posix shell give nothing.
echo Application Release 12.2L01 as of Fri Nov 2 22:11:46 EDT 2007 | read a b verno d
DBVer=$(/usr/bin/printf "%7s" $verno)
echo $DBVer # echo 12.2L01