My understanding is that a pipe in shell like a | b redirects b's stdin to a's stdout. However, I tried ls | less < somefile, the behavior is very strange. less shows the output of ls concatenated by the content of somefile.
Could someone explain this phenomenon?