< Day Day Up > |
look ”displays lines beginning with a given stringlook [-dfa] [-t termchar] string [file] look displays any lines in a file that contain a string as a prefix. As look performs a binary search, the lines in the file must be sorted. If a file is not specified, the file /usr/dict/words is used, only alphanumeric characters are compared, and the case of alphabetic characters is ignored. OPTIONS:
The look utility exits 0 if one or more lines were found and displayed, 1 if no lines were found, and >1 if an error occurred. Example A.34.1 % look sunb sunbeam sunbeams Sunbelt sunbonnet sunburn sunburnt 2 % look karen sorted.datebook 3 % look Karen sorted.datebook Karen Evich:284-758-2857:23 Edgecliff Place, Lincoln, NB 92086:7/25/53:85100 Karen Evich:284-758-2867:23 Edgecliff Place, Lincoln, NB 92743:11/3/35:58200 Karen Evich:284-758-2867:23 Edgecliff Place, Lincoln, NB 92743:11/3/35:58200 4 % look -f karen sorted.datebook Karen Evich:284-758-2857:23 Edgecliff Place, Lincoln, NB 92086:7/25/53:85100 Karen Evich:284-758-2867:23 Edgecliff Place, Lincoln, NB 92743:11/3/35:58200 Karen Evich:284-758-2867:23 Edgecliff Place, Lincoln, NB 92743:11/3/35:58200 EXPLANATION
|
< Day Day Up > |