Hacker News new | past | comments | ask | show | jobs | submit login

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

So has the FreeBSD manual page for grep(1):

* 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_0...




Interesting, 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?


Different 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.


I never knew that, thanks for sharing!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: