On Tue, 2 Mar 2004 13:04:43 -0500, Branden Robinson <branden@debian.org>
said:
Is the following construction POSIXly correct? foo=$(cat <<EOF Foo
bar baz quux. EOF)
======================================================================
ISO/IEC 9945-2:1993(E) Information Technology -- POSIX
IEEE Std 1003.2-1993 Part 2: Sheel and utilities
§ 3.6.3 Command substitution
...
lines 474-477
Within the $(command) form, all characters following the open
parenthesis to the matching closing parenthesis constitute the
/command/. Any valid shell script can be used for /command/, except
-- A script consisting solely of redirections produces unspecified
results
======================================================================