130 reputation
2
bio website
location
age
visits member for 1 year, 11 months
seen Sep 12 '12 at 23:12

please delete me


Sep
9
accepted Inconsistent input redirection behavior
Sep
8
comment Inconsistent input redirection behavior
To clarify, I do expect wc big to print "%8d %8d %8d" because in this case, the file name is a direct argument to wc, so it can optimize whatever it wants with knowledge of the file name. But I do not expect wc < big to print "%8d %8d %8d"; instead I'm expecting "%7d %7d %7d" because wc should think that its only argument is stdin, which isn't a regular file, so it should use a default width of 7, no?
Sep
8
comment Inconsistent input redirection behavior
Right, I kinda got that when I read the source code. But my question is, how does it know I'm passing it a regular file when I use <? How does it even know the file name or where the file is? Isn't the shell supposed to translate < big before it even gets to wc?
Sep
8
asked Inconsistent input redirection behavior
Sep
4
awarded  Student
Sep
4
awarded  Scholar
Sep
4
accepted Does input redirection (<) append a newline character?
Sep
4
asked Does input redirection (<) append a newline character?