Regularly, I have seen the following syntax:
awk 'stuff' <file
sort <file
The thing is, I usually write:
awk 'stuff' file
sort file
And things work perfectly. So if both syntaxes are roughly equivalent (or are they?), is there any benefit from using <file
syntax ?
EDIT
Existing threads cover some of my interrogations (using <
implies that the shell opens the file first and then passes it as standard input to the command), but I feel that some remain:
- POSIX compliancy ?
- Is it to dissipate any ambiguity concerning the nature of
file
argument ? - Is it specific to a certain type of shell ?
- Is it considered deprecated ?
- Performance-wise, is there a notable difference ?
- Any example where you would use one against the other is welcome.