UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: lognameChapter 2
Unix Commands
Next: Reference: lookbib
 

look

look [options] string [file]

Solaris only. Look through a sorted file and print all lines that begin with string. Words may be up to 256 characters long. This program is potentially faster than fgrep because it relies on the file being already sorted, and can thus do a binary search through the file, instead of reading it sequentially from beginning to end.

With no file, look searches /usr/share/lib/dict/words (the spelling dictionary) with options -df.

Options

-d

Use dictionary order. Only letters, digits, space, and tab are used in comparisons.

-f

Fold case; ignore case distinctions in comparisons.

-t char

Use char as the termination character, i.e., ignore all characters to the right of char.


Previous: Reference: lognameUNIX in a Nutshell: System V EditionNext: Reference: lookbib
Reference: lognameBook IndexReference: lookbib

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