Blob
1 .TH LOOK 12 .SH NAME3 look \- find lines in a sorted list4 .SH SYNOPSIS5 .B look6 [7 .BI -dfnixt c8 ]9 [10 .I string11 ]12 [13 .I file14 ]15 .SH DESCRIPTION16 .I Look17 consults a sorted18 .I file19 and prints all lines that begin with20 .IR string .21 It uses binary search.22 .PP23 The following options are recognized.24 Options25 .B dfnt26 affect comparisons as in27 .IR sort (1).28 .TP29 .B -i30 Interactive.31 There is no32 .I string33 argument; instead34 .I look35 takes lines from the standard input as strings to be looked up.36 .TP37 .B -x38 Exact.39 Print only lines of the file whose key matches40 .I string41 exactly.42 .TP43 .B -d44 `Directory' order:45 only letters, digits,46 tabs and blanks participate in comparisons.47 .TP48 .B -f49 Fold.50 Upper case letters compare equal to lower case.51 .TP52 .B -n53 Numeric comparison with initial string of digits, optional minus sign,54 and optional decimal point.55 .TP56 .BR -t [ \f2c\f1 ]57 Character58 .I c59 terminates the sort key in the60 .IR file .61 By default, tab terminates the key. If62 .I c63 is missing the entire line comprises the key.64 .PP65 If no66 .I file67 is specified,68 .B /lib/words69 is assumed, with collating sequence70 .BR df .71 .SH FILES72 .B /lib/words73 .SH SOURCE74 .B \*9/src/cmd/look.c75 .SH "SEE ALSO"76 .IR sort (1),77 .IR grep (1)78 .SH DIAGNOSTICS79 The exit status is80 .RB `` "not found" ''81 if no match is found, and82 .RB `` "no dictionary" ''83 if84 .I file85 or the default dictionary cannot be opened.