2 ms·
> On those echo that support options, there's generally no support of a -- to mark the end of options (zsh and possibly others support - for that though), so fo
by emillon 13y ago
> On those echo that support options, there's generally no support of a -- to mark the end of options (zsh and possibly others support - for that though), so for instance, it's difficult to output "-n" in many shells.
It's good to know (while the key takeaway lesson is "use printf"):
# bash
$ echo -n
$ echo -- -n
-- -n
$ echo - -n
- -n
# zsh
$ echo -n
$ echo -- -n
-- -n
$ echo - -n
-n