4 ms·
I don't expect any such ugly shit. A call to echo should print its arguments, no exceptions. NAME echo - echo arguments SYNOPSIS ec
by enriquto 2y ago
I don't expect any such ugly shit. A call to echo should print its arguments, no exceptions.
NAME
echo - echo arguments
SYNOPSIS
echo [ arg ... ]
DESCRIPTION
Echo writes its arguments in order as a line on the standard
output file. It is mainly useful for producing diagnostics
in command files.
- scubbo 2y agoExceptions to rules cause mental overhead and maintenance headaches. Why should `echo` be the single solitary tool that responds differently to invocation with `--help`?
- enriquto 2y agoLet me play the uno reverse card: why should "--help" be the single solitary string that echo does not print like the others?
- scubbo 2y agoFor two reasons, both related to the Principle of Least Astonishment: * Because the likelihood that someone entering `echo --help` _actually_ wants to print `--help` is staggeringly low * Because it's not the "single solitary string" that has special handling - `echo -n` does not print `-n`. `echo` already supports flags, and so it would be most-consistent and least-surprising for it to also support a standard default one