Is there a some man-like program (or site/book) that can show me simple examples of common tools usage?

So i can type in terminal show-example grep and it will output


For matching multiple characters, use the asterisk. 
This example selects all words starting with 
"c" and ending in "h" from the system's dictionary:

  grep '\<c.*h\>' /usr/share/dict/words
  • Since grep (used in your example) is used in so many different ways, it would be difficult to find a list of common ways to use the tool. You learn how to write a regular expression, and the you apply it with grep or sed or awk to your particular data. It's almost, but not quite, as futile as looking for "examples of common C programs" since a program is written to perform a particular task (a task that you personally might never have to solve in real life). – Kusalananda May 23 '19 at 19:42
  • What you may be looking for is a tutorial for composing regular expressions. Unfortunately, requests for tutorials are considered off-topic on this site, as answers to such requests tend to result in useless lists of links, half of which go dead within six months. – Kusalananda May 23 '19 at 19:44
  • @Kusalananda don't get me wrong, i do not need example exactly for grep. I would like to type show-example find or show-example traceroute and get examples for other common programs – nonForgivingJesus May 23 '19 at 19:49
  • Well, the manuals for both find and traceroute on my system contains examples... The grep manual too contains examples. – Kusalananda May 23 '19 at 19:53
  • 1
    @muru you should make it as an answer! Thank you! – nonForgivingJesus May 25 '19 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.