Skip to main content
Tweeted twitter.com/StackUnix/status/819851031593054208
"CLI" --> command-line, "channel" --> "stream" , spelling of "stdout" and minor markup.
Source Link
Kusalananda
  • 356.6k
  • 42
  • 739
  • 1.1k

When to use standard error channelstream in CLIcommand-line application?

Is there a guideline when to use the error when writing a CLIcommand-line application.? To my surprise, I didn't find anything when googling it.

In particular, the question I'm concerned with right now is whether to use sdtoutstdout or stderrstderr when the user called the program with illegal arguments. However, a more comprehensive answer is very much appreciated because this surely won't be the only case in which a clear rule is needed to write a program which behaves in the way it's expected to by the user.

When to use error channel in CLI application?

Is there a guideline when to use the error when writing a CLI application. To my surprise, I didn't find anything when googling it.

In particular, the question I'm concerned with right now is whether to use sdtout or stderr when the user called the program with illegal arguments. However, a more comprehensive answer is very much appreciated because this surely won't be the only case in which a clear rule is needed to write a program which behaves in the way it's expected to by the user.

When to use standard error stream in command-line application?

Is there a guideline when to use the error when writing a command-line application? To my surprise, I didn't find anything when googling it.

In particular, the question I'm concerned with right now is whether to use stdout or stderr when the user called the program with illegal arguments. However, a more comprehensive answer is very much appreciated because this surely won't be the only case in which a clear rule is needed to write a program which behaves in the way it's expected to by the user.

Source Link
UTF-8
  • 3.4k
  • 6
  • 30
  • 53

When to use error channel in CLI application?

Is there a guideline when to use the error when writing a CLI application. To my surprise, I didn't find anything when googling it.

In particular, the question I'm concerned with right now is whether to use sdtout or stderr when the user called the program with illegal arguments. However, a more comprehensive answer is very much appreciated because this surely won't be the only case in which a clear rule is needed to write a program which behaves in the way it's expected to by the user.