Why do some commands have man pages and other commands use –help
documentationman
Wouldn't it be more consistent if one of these always worked?
Best Answer
Yes it would be more consistent. This has nothing to do with cross-platform and everything to do with developers not writing (wanting to write) documentation. a man page is documentation, --help is mostly programming in nature. I've also seen the case where man pages didn't exist because the developer didn't know how to make one, or convert the documentation from another format, sometimes this is easily remedied.
I would like to note that I wish both always worked.
You probably have the man page for echo because most systems have an echo binary in /bin, even though most shells provide a built-in anyway; you're seeing the man page for that binary. The man pages for all the other commands you're missing are in the POSIX Programmer's Manual (man section 1P). How to install it will depend on your distro; on Gentoo they're in the sys-apps/man-pages-posix package
Best Answer
Yes it would be more consistent. This has nothing to do with cross-platform and everything to do with developers not writing (wanting to write) documentation. a
man
page is documentation,--help
is mostly programming in nature. I've also seen the case where man pages didn't exist because the developer didn't know how to make one, or convert the documentation from another format, sometimes this is easily remedied.I would like to note that I wish both always worked.