Add whatis hooks to bash scripts

I just opened whatis and want to add information to my bash scripts.

What is the best way to add information to bash scripts for

whatis 

to raise?

+4
source share
1 answer

whatis gets all the information from the whatis database, which is created using the makewhatis .

There are two ways to add an entry to the database.

  • Create and install a help page for your program or script, then run makewhatis .
  • Manually edit whatis database (not recommended)

makewhatis takes the first line from the NAME section of your team’s makewhatis page.

The location of the whatis database on my machine /usr/share/man/whatis is how it looks.

 ABORT(7) - abort the current transaction ALTER_AGGREGATE(7) - change the definition of an aggregate function ALTER_COLLATION(7) - change the definition of a collation ALTER_CONVERSION(7) - change the definition of a conversion ... ping(8) - send ICMP ECHO_REQUEST packets to network hosts ... 

And here is the conclusion of man ping

 NAME ping -- send ICMP ECHO_REQUEST packets to network hosts SYNOPSIS ping [-AaCDdfnoQqRrv] [-b boundif] [-c count] [-G sweepmaxsize] 
+4
source

Source: https://habr.com/ru/post/1487780/


All Articles