O'Reilly logo

Linux Pocket Guide, 2nd Edition by Daniel J. Barrett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

look — stdin  stdout  - file  -- opt  --help  --version

Synopsis

look [options] prefix [dictionary_file]

The look command prints (on standard output) words that begin with a given string prefix. The words are located in a dictionary file (default /usr/share/dict/words). For instance, look bigg prints:

bigger
biggest
Biggs

If you supply your own dictionary file—any text file with alphabetically sorted lines—look will print all lines beginning with the given prefix.

Useful options

-f

Ignore case.

-t X

Match the prefix only up to and including the termination character X. For instance, look -t i big prints all words beginning with “bi”.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required