Q:

How does the bash command myvar=$(<myfile) work?

myvar=$(<myfile)

This reads the contents of myfile into the variable myvar. It doesn't look like process substitution. It doesn't look like redirection since there is no command that directs into. How does this work?

A:

From the Bash Manual, section "Command Substitution":

The command substitution $(cat file) can be replaced by the equivalent but faster $(< file).

