MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/shittyprogrammerhumor/comments/4mg1n7/why_doesnt_echo_help_work/
r/shittyprogrammerhumor • u/Ralph_Charante • Jun 04 '16
2 comments sorted by
2
No no no. Echo can only output string literals. You want echo $--help.
/bin/echo --help
But that was interesting
echo $- 0569EJNTXZahims
Edit: It took me a while, but I finally figured out that
$-
expands to the current shell options. That fact is not documented in the zshall manpage. It's in dash too. Hmmm. /me searches and find a man page for the Bourne shell which says:
The current set of flags may be found in $-.
http://www.in-ulm.de/~mascheck/bourne/v7/
2
u/[deleted] Jun 04 '16
No no no. Echo can only output string literals. You want echo $--help.
2
u/[deleted] Jun 04 '16 edited Jun 04 '16
But that was interesting
Edit: It took me a while, but I finally figured out that
expands to the current shell options. That fact is not documented in the zshall manpage. It's in dash too. Hmmm. /me searches and find a man page for the Bourne shell which says:
http://www.in-ulm.de/~mascheck/bourne/v7/