A variant of here documents, the format is:
The string is supplied to the command on its standard input. Remember of course, that "string" can be replaced with a variable.
I find Here String's very useful to easily assign values to multiple variables.
The 'read' command claims to read from the standard input, but it doesn't actually seem to happen when a pipe is involved. Each command in the pipeline gets executed in its own subshell and so the variables are set there and not passed back to the parent process. This is why
DOES NOT WORK
How to get around this problem using Here Strings:
Now try:
and hopefully the value of the three variables will be displayed for you.
3 pages link to HereStrings:
lib/main.php:944: Notice: PageInfo: Cannot find action page