| <head> |
| <title>look(1) - Plan 9 from User Space</title> |
| <meta content="text/html; charset=utf-8" http-equiv=Content-Type> |
| </head> |
| <body bgcolor=#ffffff> |
| <table border=0 cellpadding=0 cellspacing=0 width=100%> |
| <tr height=10><td> |
| <tr><td width=20><td> |
| <tr><td width=20><td><b>LOOK(1)</b><td align=right><b>LOOK(1)</b> |
| <tr><td width=20><td colspan=2> |
| <br> |
| <p><font size=+1><b>NAME </b></font><br> |
| |
| <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> |
| |
| look – find lines in a sorted list<br> |
| |
| </table> |
| <p><font size=+1><b>SYNOPSIS </b></font><br> |
| |
| <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> |
| |
| <tt><font size=+1>look</font></tt> [ <tt><font size=+1>−dfnixt</font></tt><i>c</i> ] [ <i>string</i> ] [ <i>file</i> ]<br> |
| |
| </table> |
| <p><font size=+1><b>DESCRIPTION </b></font><br> |
| |
| <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> |
| |
| <i>Look</i> consults a sorted <i>file</i> and prints all lines that begin with |
| <i>string</i>. It uses binary search. |
| <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table> |
| |
| The following options are recognized. Options <tt><font size=+1>dfnt</font></tt> affect comparisons |
| as in <a href="../man1/sort.html"><i>sort</i>(1)</a>.<br> |
| <tt><font size=+1>−i</font></tt> Interactive. There is no <i>string</i> argument; instead <i>look</i> takes |
| lines from the standard input as strings to be looked up.<br> |
| <tt><font size=+1>−x</font></tt> Exact. Print only lines of the file whose key matches <i>string</i> |
| exactly.<br> |
| <tt><font size=+1>−d</font></tt> ‘Directory’ order: only letters, digits, tabs and blanks participate |
| in comparisons.<br> |
| <tt><font size=+1>−f</font></tt> Fold. Upper case letters compare equal to lower case.<br> |
| <tt><font size=+1>−n</font></tt> Numeric comparison with initial string of digits, optional minus |
| sign, and optional decimal point.<br> |
| <tt><font size=+1>−t</font></tt>[<i>c</i>]Character <i>c</i> terminates the sort key in the <i>file</i>. By default, |
| tab terminates the key. If <i>c</i> is missing the entire line comprises |
| the key. |
| <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table> |
| |
| If no <i>file</i> is specified, <tt><font size=+1>/lib/words</font></tt> is assumed, with collating |
| sequence <tt><font size=+1>df</font></tt>.<br> |
| |
| </table> |
| <p><font size=+1><b>FILES </b></font><br> |
| |
| <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> |
| |
| <tt><font size=+1>/lib/words<br> |
| </font></tt> |
| </table> |
| <p><font size=+1><b>SOURCE </b></font><br> |
| |
| <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> |
| |
| <tt><font size=+1>/usr/local/plan9/src/cmd/look.c<br> |
| </font></tt> |
| </table> |
| <p><font size=+1><b>SEE ALSO </b></font><br> |
| |
| <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> |
| |
| <a href="../man1/sort.html"><i>sort</i>(1)</a>, <a href="../man1/grep.html"><i>grep</i>(1)</a><br> |
| |
| </table> |
| <p><font size=+1><b>DIAGNOSTICS </b></font><br> |
| |
| <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> |
| |
| The exit status is “<tt><font size=+1>not found</font></tt>” if no match is found, and “<tt><font size=+1>no dictionary</font></tt>” |
| if <i>file</i> or the default dictionary cannot be opened.<br> |
| |
| </table> |
| |
| <td width=20> |
| <tr height=20><td> |
| </table> |
| <!-- TRAILER --> |
| <table border=0 cellpadding=0 cellspacing=0 width=100%> |
| <tr height=15><td width=10><td><td width=10> |
| <tr><td><td> |
| <center> |
| <a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a> |
| </center> |
| </table> |
| <!-- TRAILER --> |
| </body></html> |