home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 50.3 apropos on Systems Without apropos Chapter 50
Help--Online Documentation, etc.
Next: 50.5 whereis: Finding Where a Command Is Located
 

50.4 whatis: One-Line Command Summaries

whatis is almost identical to apropos ( 50.2 ) , 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 50.3 , you can simulate whatis with an alias ( 10.3 ) or shell function ( 10.9 ) :

alias whatis "grep '^ *'\!$ /home/mike/manindex.txt"

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

- ML


Previous: 50.3 apropos on Systems Without apropos UNIX Power Tools Next: 50.5 whereis: Finding Where a Command Is Located
50.3 apropos on Systems Without apropos Book Index 50.5 whereis: Finding Where a Command Is Located

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System