3 ms·
They 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
by JdeBP 3y ago
They 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!