display lines beginning with a given string


SUBMITTED BY: Guest

DATE: June 2, 2014, 2:27 p.m.

FORMAT: Text only

SIZE: 1.2 kB

HITS: 5955

  1. NAME
  2. look - display lines beginning with a given string
  3. SYNOPSIS
  4. look [-dfa ] [-t termchar ] string [file ]
  5. DESCRIPTION
  6. The look utility displays any lines in file which contain string as a prefix. As look performs a binary search, the lines in file must be sorted (where sort(1) got the same options -d and/or -f that look is invoked with).
  7. If file is not specified, the file /usr/share/dict/words is used, only alphanumeric characters are compared and the case of alphabetic characters is ignored.
  8. Options:
  9. -d
  10. Dictionary character set and order, i.e. only alphanumeric characters are compared.
  11. -f
  12. Ignore the case of alphabetic characters.
  13. -a
  14. Use the alternate dictionary /usr/share/dict/web2
  15. -t
  16. Specify a string termination character, i.e. only the characters in string up to and including the first occurrence of termchar are compared.
  17. 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.
  18. FILES
  19. /usr/share/dict/words
  20. the dictionary
  21. /usr/share/dict/web2
  22. the alternate dictionary

comments powered by Disqus