[manual index][section index]


look - find lines in a sorted list


look [ -dfnix ] [ -r endkey ] [ -tc ] [ string ] [ file ]


Look consults a sorted file and prints all lines that begin with string. It uses binary search.

The following options are recognised:

Interactive. There is no string argument; instead look takes lines from the standard input as strings to be looked up.
Exact. Print only lines of the file whose key matches string exactly.
`Directory' order: only letters, digits, tabs and blanks participate in comparisons.
Fold. Upper case letters compare equal to lower case.
Numeric comparison with initial string of digits, optional minus sign, and optional decimal point.
-r endkey
Limit the range of matching values, to include the word endkey but no larger values.
Character c terminates the sort key in the file. By default, tab terminates the key. If c is missing the entire line comprises the key.

If no file is specified, /lib/words is assumed, with collating sequence df.






sort(1), grep(1)


The exit status is not found if no match is found, and no dictionary if file or the default dictionary cannot be opened.

LOOK(1 ) Rev:  Tue Mar 31 02:42:38 GMT 2015