whatis: One-Line Command Summaries

whatis is almost identical to apropos (), but it requires a command name as an argument - rather than an arbitrary string. Why is this useful? Well, let's say you forget what cat does. On my system, apropos cat gives you several screenfuls of output. You may not want to read the entire manual page. But whatis cat gives you a nice one-line summary:

% whatis cat cat (1V) - concatenate and display 

If you're using the apropos fake-out we discussed in article , you can simulate whatis with an alias () or shell function ():

alias whatis "grep '^ *'\!$ /home/mike/manindex.txt" whatis() {
 grep "^ *$1" /home/mike/manindex.txt;
}

- ML