3.3 Redirecting: “<”
Redirecting STDIN
Many standard commands of BASH like “head” are reading input from STDIN if no file is provided.
Using “head” on a file
We can use head from STDIN
In the example above, “head -n2” will print 2 lines in the screen but Enter is pressed without providing a file name, so we will have to type two new lines in order to validate the condition.
STDIN can be also redirected to a file using the operator “<”. However, in many cases this is redundant.