3 ms·
cut does the right thing: - if you run cut with no input and no parameters, it outputs an error message to STDERR - if you run cut --help it outputs usage inf
by rahimnathwani 3y ago
cut does the right thing:
- if you run cut with no input and no parameters, it outputs an error message to STDERR
- if you run cut --help it outputs usage info to STDOUT
This is what I'd expect based on the man page. Running cut with no parameters is undefined, hence the output to STDERR. Running cut --help is defined, so the output goes to STDERR.
I think people get confused because some tools, when run without any input, output the full help info to STDERR, instead of suggesting the user run foo --help*.
So foo* and foo --help* appear to be equivalent. Until you pipe into less*.