forsyth20121205-174063a80cc13 years agoHistory
90 lines · 1.4 KB · Text
RawDownload
.TH LOOK 1.SH NAMElook \- find lines in a sorted list.SH SYNOPSIS.B look[.BI -dfnix] [.BI -r " endkey"] [.BI -t c] [.I string][.I file].SH DESCRIPTION.I Lookconsults a sorted.I fileand prints all lines that begin with.IR string .It uses binary search..PPThe following options are recognised:.TP.B -iInteractive.There is no.I stringargument; instead.I looktakes lines from the standard input as strings to be looked up..TP.B -xExact.Print only lines of the file whose key matches.I stringexactly..TP.B  -d`Directory' order:only letters, digits,tabs and blanks participate in comparisons..TP.B  -fFold.Upper case letters compare equal to lower case..TP.B -nNumeric comparison with initial string of digits, optional minus sign,and optional decimal point..TP.BI -r " endkey"Limit the range of matching values, to includethe word.I endkeybut no larger values..TP.BR -t [ \f2c\f1 ]Character.I cterminates the sort key in the.IR file .By default, tab terminates the key.  If.I cis missing the entire line comprises the key..PPIf no.I fileis specified,.B /lib/wordsis assumed, with collating sequence.BR df ..SH FILES.B /lib/words.SH SOURCE.B /appl/cmd/look.b.SH "SEE ALSO".IR sort (1), .IR grep (1).SH DIAGNOSTICSThe exit status is.B \&"not found"if no match is found, and.B \&"no dictionary"if.I fileor the default dictionary cannot be opened.