This question already has an answer here:

man -k '^printf' lists man pages specifically available for printf utility only, printf(1) and printf(3) in my PC. If you do not mention these signs around printf, the command doesn't work.

I want to make an alias mank for this but I am stuck at the logic.

I want to be able to type mank utility and have the same output as man -k '^utility'.

This way without typing silly symbols, we would get all the man pages available for that utility.

marked as duplicate by Michael Homer, Jeff Schaller, Stephen Rauch, countermode, Rui F Ribeiro Jun 28 '17 at 8:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Can you use a function instead? – Michael Homer Jun 28 '17 at 0:51
  • @MichaelHomer I don't know any function, I am a newbie. If you know, let me know.. – GypsyCosmonaut Jun 28 '17 at 1:05
  • You could consider alias mank=apropos. – Kusalananda Jun 28 '17 at 7:03

Clear the old alias, then make a function, and run it:

unalias mank
mank() { man -k "^$1" ; }
mank printf


printf (1)           - format and print data
printf (1posix)      - write formatted output
printf (3)           - formatted output conversion
printf (3posix)      - print formatted output

Not the answer you're looking for? Browse other questions tagged or ask your own question.