<<<"$(<file)" (supported by
<<< was first introduced, inspired by the same operator in the Unix port of
$(<file) operator was introduced by
$(<file), the shell reads the content of the
file (chokes on NUL bytes except for
zsh), removes all the trailing newline characters and that makes the expansion of
$(<file) (so the content of the file is stored as a whole in memory).
<<< some-text, the shell stores
some-text followed by one newline character into a temporary file, and opens that temporary file on the file descriptor 0.
<<<"$(<file)" opens stdin for reading on a temporary copy of
file where trailing newline characters have been replaced by just one (and with various misbehaviours if the file contains NUL bytes, except in
< file, it's
file that is directly opened for reading on stdin.
< file is much more efficient (doesn't involve a copy on disk and in memory), but one might want to use the
<<<"$(<file)" to make sure the file open on stdin is a regular file, or to make sure the file has been fully read by the time the command is started (in case that command writes to it for instance) or another redirection is processed (like one that would truncate
file as in
tr 1 2 <<< "$(<file)" > file).
yash supports the
<<< operator (though implements it with a pipe (so not a regular file) instead of a temporary file). but not the
$(<file) one. You can use
<<<"$(cat < file)" instead there.
yash strings are characters only, so the
"$(cat < file)" will choke on sequences of bytes that don't form valid characters, while other shells can usually cope OK with them.