We can redirect the contents of one file descriptor to another. By using redirection, we can read data from a file as stdin as follows:
$ cmd < file
Source: Linux Shell Scripting Cookbook
Subscribe to our e-mail newsletter to receive updates.
bash, files descriptors redirection, shell