What does a bare < do?

< sets up redirection for a command that can occur before or after the redirection instructions. I.e.

$ < file wc

works as well as

$ wc < file

But if you don't give a command, bash sets up the redirection and doesn't do anything else. For input redirection, this amounts to what you saw, nothing, if the file exists and is readable. If the file does not exist or is not readable bash will signal an error. For output redirection, the output file will be created if it does not exist. Any existing output file will be truncated if > is used; no truncation if >> is used.


< reads from stdin by default, or a file. your expression does not do anything with the input because you did not do anyting after reading.

if you do < some-file-that-exists > outputfile at the end, then you will see that you have just read in the content of the first file and wrote it to the second file.

<<< is here doc format, so it reads from a string instead from a file. cat <<<"any string" to see what you have read.