osf1 man page for look

Query: look

OS: osf1

Section: 1

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

look(1) 						      General Commands Manual							   look(1)

NAME
look - Finds lines in a sorted list
SYNOPSIS
look [-df] [-tcharacter] string [file] The look command prints all lines in a sorted file that begin with string.
OPTIONS
Uses dictionary order; only letters, digits, tabs, and spaces are used in comparisons. Searches without regard to case; treats uppercase and lowercase as equivalent. Ignores character and characters following it in the search string. If you specify look -tC ABCDE, the string ABCDE would become (in effect) AB, with CDE being ignored. This option is primarily for shell scripts, in which more than one string is being processed.
DESCRIPTION
If no file is specified, look searches in the system word list /usr/share/dict/words, with the options -df assumed by default. The look command uses binary search. The -d and -f options affect comparisons as in sort.
NOTES
In order to use the -f option, you must first sort file with the sort -f command; otherwise, look displays only lowercase items. If you do not specify -f, but specify a file (such as /usr/share/dict/words) that has been sorted with sort -f, look may not produce any output.
EXAMPLES
To search a sorted file called sortfile for all lines that begin with the string as, enter: look as sortfile To search the system word list for all words beginning with smi, enter: look smi This might result in: smile smirk smith smithereens Smithfield Smithson smithy smitten
FILES
System word list.
SEE ALSO
Commands: grep(1), sort(1), spell(1) look(1)
Related Man Pages
look(1) - linux
look(1) - suse
look(1) - hpux
look(1) - php
look(1) - x11r4
Similar Topics in the Unix Linux Community
Grepping for Exact Strings
search for key word and execute
sort file text by date as a "ls -t"
Search for exact string
[Solved] Replace the second pattern alone in VI.