(no title)
heads | 2 years ago
Without it you get this behavior:
> heights | sort -k2 -nr
George 186
Wally 173
NAME HEIGHT
But if the headers bypass stdout then you get this instead: > heights | sort -k2 -nr
NAME HEIGHT
George 186
Wally 173
layer8|2 years ago
does the right thing.
(from https://stackoverflow.com/a/56151840)
quesera|2 years ago
This is a persistent limitation of the in-band text-only model. But I think this misuse of STDERR would be more confusing than helpful.
If `heights` was a file, you could do this:
If `heights` is an executable that would be expensive to call twice: Or you could pipe to `awk`, etc.Granted, these other options are less convenient, but they are also less surprising, and they work even if the executable creator has different ideas.
Sometimes you gotta do what you gotta do.
xuhu|2 years ago