*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> look (1)              
Title
Content
Arch
Section
 

look(1)

Contents


NAME    [Toc]    [Back]

       look - Finds lines in a sorted list

SYNOPSIS    [Toc]    [Back]

       look [-df] [-tcharacter] string [file]

       The  look  command  prints all lines in a sorted file that
       begin with string.

OPTIONS    [Toc]    [Back]

       Uses dictionary order; only  letters,  digits,  tabs,  and
       spaces  are  used in comparisons.  Searches without regard
       to case; treats uppercase  and  lowercase  as  equivalent.
       Ignores  character  and  characters  following  it  in the
       search string.  If you specify look -tC ABCDE, the  string
       ABCDE would become (in effect) AB, with CDE being ignored.
       This option is primarily for shell scripts, in which  more
       than one string is being processed.

DESCRIPTION    [Toc]    [Back]

       If  no file is specified, look searches in the system word
       list /usr/share/dict/words, with the options  -df  assumed
       by default.

       The look command uses binary search.

       The -d and -f options affect comparisons as in sort.

NOTES    [Toc]    [Back]

       In  order  to  use the -f option, you must first sort file
       with the sort -f command; otherwise,  look  displays  only
       lowercase items.

       If  you  do  not  specify  -f, but specify a file (such as
       /usr/share/dict/words) that has been sorted with sort  -f,
       look may not produce any output.

EXAMPLES    [Toc]    [Back]

       To search a sorted file called sortfile for all lines that
       begin with the string  as,  enter:  look  as  sortfile  To
       search  the  system word list for all words beginning with
       smi, enter: look smi

              This might result in: smile smirk smith smithereens
              Smithfield Smithson smithy smitten

FILES    [Toc]    [Back]

       System word list.

SEE ALSO    [Toc]    [Back]

      
      
       Commands:  grep(1), sort(1), spell(1)



                                                          look(1)
[ Back ]
 Similar pages
Name OS Title
uniq Linux remove duplicate lines from a sorted file
comm IRIX select or reject lines common to two sorted files
comm HP-UX select or reject lines common to two sorted files
cdk_alphalist NetBSD Creates a managed curses sorted alphabet list widget.
dialups Linux List of dialup lines
paste IRIX merge same lines of several files or subsequent lines of one file
paste HP-UX merge same lines of several files or subsequent lines of one file
paste Tru64 Joins corresponding lines of several files or subsequent lines in one file
comm Tru64 Compares two sorted files.
bsearch FreeBSD binary search of a sorted table
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service