4 ms·
What I don't understand is why don't manpages have clear example of common usages? I imagine there's many many people that want to contribute that to the manpag
by sergiotapia 3y ago
What I don't understand is why don't manpages have clear example of common usages? I imagine there's many many people that want to contribute that to the manpages, are they not there because leadership doesn't allow them for some reason?
Take grep for example https://linuxcommand.org/lc3_man_pages/grep1.html https://linuxcommand.org/lc3_man_pages/grep1.html - it has everything and the kitchen sink but hell bro tell me how to find something is the 99% use case most people will use it.
For cases like this ChatGPT has been helpful.
- markus_zhang 3y agoFrom my experience most manuals actually don't have scenarios. Is git or docker better? I need to check and see, but from memory their manual pages mostly list all switches but a couple of examples at best. I could be wrong and need to double check.
- deleted 3y ago[deleted]
- JdeBP 3y agoThey do have. You're just looking at the manual from one particular source of utilities, GNU, and overgeneralizing. Aside from the well-known antipathy to man pages, with every GNU manual page telling you at its foot to go and use a different tool to read a different doco format, it is not representative of manual pages in general. The Illumos manual page for grep(1) has an examples section: * https://illumos.org/man/1/grep#examples https://illumos.org/man/1/grep#examples So has the FreeBSD manual page for grep(1): * https://man.freebsd.org/cgi/man.cgi?query=grep&sektion=1#EXAMPLES https://man.freebsd.org/cgi/man.cgi?query=grep&sektion=1#EXA... Not everything is written like GNU man(1) pages. Even the Linux Documentation Project has a novice's approach to grep with several basic examples in its _Introduction To Linux_: * https://tldp.org/LDP/intro-linux/html/sect_03_03.html#sect_03_03_03_04 https://tldp.org/LDP/intro-linux/html/sect_03_03.html#sect_0...
- sergiotapia 3y agoInteresting, I thought grep was grep and period. I didn't realize every Linux had their own version of grep with their own man pages. Is this like a youtube-dl / ytp-dl situation?
- pxc 3y agoDifferent Unices have different grep implementations. Most Linux distros use a particular implementation of grep: the GNU one. And no, it's not like youtube-dl and yt-dlp. Some of the Unix implementations might have shared ancestry, but GNU grep is a from-scratch clone.
- sergiotapia 3y agoI never knew that, thanks for sharing!