News for hackers. Stuff that matters.
Re:Tell HN: Please don't print –help to stderr in your CLI t... by dingosity on Thursday September 28, 2023 @02:26PM (#37693620)
Sure. I don't need to be a grumpy elitist.

The problem isn't that you get a usage message when you ask for it. It's that you get a usage message (written to STDOUT) when you don't. Many commands will print out the usage message when command line options specify a condition that can't be met. I find this frequently when ssh'ing into busybox based systems. Busybox's find command is much less "refined" than comparable desktop OS finds (BSD & GNU/Linux).

So if I do something like:

  ssh [email protected] "find . -type f | while read line; do sha256sum \$line; done" | tr -s ' ' | cut -f 2,1 -d ' ' | sort | uniq -c
And expect output that looks something like a sorted line of hashes, I will be sorely disappointed.

There are no comments on this comment yet.