head 1.9; access; symbols netbsd-6-1:1.9.0.20 netbsd-6-0-2-RELEASE:1.9 netbsd-6-1-RELEASE:1.9 netbsd-6-1-RC4:1.9 netbsd-6-1-RC3:1.9 agc-symver:1.9.0.18 agc-symver-base:1.9 netbsd-6-1-RC2:1.9 tls-maxphys-nbase:1.9.0.16 netbsd-6-1-RC1:1.9 yamt-pagecache-base8:1.9 netbsd-5-2:1.8.0.52 netbsd-6-0-1-RELEASE:1.9 yamt-pagecache-base7:1.9 netbsd-5-2-RELEASE:1.8 netbsd-5-2-RC1:1.8 matt-nb6-plus-nbase:1.9 yamt-pagecache-base6:1.9 netbsd-6-0:1.9.0.14 netbsd-6-0-RELEASE:1.9 netbsd-6-0-RC2:1.9 tls-maxphys:1.9.0.12 tls-maxphys-base:1.9 matt-nb6-plus:1.9.0.10 matt-nb6-plus-base:1.9 netbsd-6-0-RC1:1.9 yamt-pagecache-base5:1.9 yamt-pagecache-base4:1.9 netbsd-6:1.9.0.8 netbsd-6-base:1.9 netbsd-5-1-2-RELEASE:1.8 netbsd-5-1-1-RELEASE:1.8 yamt-pagecache-base3:1.9 yamt-pagecache-base2:1.9 yamt-pagecache:1.9.0.6 yamt-pagecache-base:1.9 cherry-xenmp:1.9.0.4 cherry-xenmp-base:1.9 bouyer-quota2-nbase:1.9 bouyer-quota2:1.9.0.2 bouyer-quota2-base:1.9 matt-mips64-premerge-20101231:1.9 matt-nb5-mips64-premerge-20101231:1.8 matt-nb5-pq3:1.8.0.50 matt-nb5-pq3-base:1.8 netbsd-5-1:1.8.0.48 netbsd-5-1-RELEASE:1.8 netbsd-5-1-RC4:1.8 matt-nb5-mips64-k15:1.8 netbsd-5-1-RC3:1.8 netbsd-5-1-RC2:1.8 netbsd-5-1-RC1:1.8 netbsd-5-0-2-RELEASE:1.8 matt-nb5-mips64-premerge-20091211:1.8 matt-premerge-20091211:1.8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.8 matt-nb4-mips64-k7-u2a-k9b:1.8 matt-nb5-mips64-u1-k1-k5:1.8 matt-nb5-mips64:1.8.0.46 netbsd-5-0-1-RELEASE:1.8 jym-xensuspend-nbase:1.8 netbsd-5-0:1.8.0.44 netbsd-5-0-RELEASE:1.8 netbsd-5-0-RC4:1.8 netbsd-5-0-RC3:1.8 netbsd-5-0-RC2:1.8 jym-xensuspend:1.8.0.42 jym-xensuspend-base:1.8 netbsd-5-0-RC1:1.8 netbsd-5:1.8.0.40 netbsd-5-base:1.8 matt-mips64-base2:1.8 matt-mips64:1.8.0.38 mjf-devfs2:1.8.0.36 mjf-devfs2-base:1.8 netbsd-4-0-1-RELEASE:1.8 wrstuden-revivesa-base-3:1.8 wrstuden-revivesa-base-2:1.8 wrstuden-fixsa-newbase:1.8 wrstuden-revivesa-base-1:1.8 yamt-pf42-base4:1.8 yamt-pf42-base3:1.8 hpcarm-cleanup-nbase:1.8 yamt-pf42-baseX:1.8 yamt-pf42-base2:1.8 wrstuden-revivesa:1.8.0.34 wrstuden-revivesa-base:1.8 yamt-pf42:1.8.0.32 yamt-pf42-base:1.8 keiichi-mipv6-nbase:1.8 keiichi-mipv6:1.8.0.30 keiichi-mipv6-base:1.8 matt-armv6-nbase:1.8 matt-armv6-prevmlocking:1.8 wrstuden-fixsa-base-1:1.8 netbsd-4-0:1.8.0.28 netbsd-4-0-RELEASE:1.8 cube-autoconf:1.8.0.26 cube-autoconf-base:1.8 netbsd-4-0-RC5:1.8 netbsd-4-0-RC4:1.8 netbsd-4-0-RC3:1.8 netbsd-4-0-RC2:1.8 netbsd-4-0-RC1:1.8 matt-armv6:1.8.0.24 matt-armv6-base:1.8 matt-mips64-base:1.8 hpcarm-cleanup:1.8.0.22 hpcarm-cleanup-base:1.8 netbsd-3-1-1-RELEASE:1.8 netbsd-3-0-3-RELEASE:1.8 wrstuden-fixsa:1.8.0.20 wrstuden-fixsa-base:1.8 abandoned-netbsd-4-base:1.8 abandoned-netbsd-4:1.8.0.14 netbsd-3-1:1.8.0.16 netbsd-3-1-RELEASE:1.8 netbsd-3-0-2-RELEASE:1.8 netbsd-3-1-RC4:1.8 netbsd-3-1-RC3:1.8 netbsd-3-1-RC2:1.8 netbsd-3-1-RC1:1.8 netbsd-4:1.8.0.18 netbsd-4-base:1.8 chap-midi-nbase:1.8 netbsd-3-0-1-RELEASE:1.8 chap-midi:1.8.0.12 chap-midi-base:1.8 netbsd-3-0:1.8.0.10 netbsd-3-0-RELEASE:1.8 netbsd-3-0-RC6:1.8 netbsd-3-0-RC5:1.8 netbsd-3-0-RC4:1.8 netbsd-3-0-RC3:1.8 netbsd-3-0-RC2:1.8 netbsd-3-0-RC1:1.8 netbsd-2-0-3-RELEASE:1.8 netbsd-2-1:1.8.0.8 netbsd-2-1-RELEASE:1.8 netbsd-2-1-RC6:1.8 netbsd-2-1-RC5:1.8 netbsd-2-1-RC4:1.8 netbsd-2-1-RC3:1.8 netbsd-2-1-RC2:1.8 netbsd-2-1-RC1:1.8 netbsd-2-0-2-RELEASE:1.8 netbsd-3:1.8.0.6 netbsd-3-base:1.8 netbsd-2-0-1-RELEASE:1.8 netbsd-2:1.8.0.4 netbsd-2-base:1.8 netbsd-2-0-RELEASE:1.8 netbsd-2-0-RC5:1.8 netbsd-2-0-RC4:1.8 netbsd-2-0-RC3:1.8 netbsd-2-0-RC2:1.8 netbsd-2-0-RC1:1.8 netbsd-2-0:1.8.0.2 netbsd-2-0-base:1.8 netbsd-1-6-PATCH002-RELEASE:1.7 netbsd-1-6-PATCH002:1.7 netbsd-1-6-PATCH002-RC4:1.7 netbsd-1-6-PATCH002-RC3:1.7 netbsd-1-6-PATCH002-RC2:1.7 netbsd-1-6-PATCH002-RC1:1.7 netbsd-1-6-PATCH001:1.7 netbsd-1-6-PATCH001-RELEASE:1.7 netbsd-1-6-PATCH001-RC3:1.7 netbsd-1-6-PATCH001-RC2:1.7 netbsd-1-6-PATCH001-RC1:1.7 fvdl_fs64_base:1.7 netbsd-1-6-RELEASE:1.7 netbsd-1-6-RC3:1.7 netbsd-1-6-RC2:1.7 netbsd-1-6-RC1:1.7 netbsd-1-6:1.7.0.2 netbsd-1-6-base:1.7 netbsd-1-5-PATCH003:1.5 netbsd-1-5-PATCH002:1.5 netbsd-1-5-PATCH001:1.5 netbsd-1-5-RELEASE:1.5 netbsd-1-5-BETA2:1.5 netbsd-1-5-BETA:1.5 netbsd-1-4-PATCH003:1.5 netbsd-1-5-ALPHA2:1.5 netbsd-1-5:1.5.0.10 netbsd-1-5-base:1.5 minoura-xpg4dl-base:1.5 minoura-xpg4dl:1.5.0.8 netbsd-1-4-PATCH002:1.5 wrstuden-devbsize-19991221:1.5 wrstuden-devbsize:1.5.0.6 wrstuden-devbsize-base:1.5 comdex-fall-1999:1.5.0.4 comdex-fall-1999-base:1.5 netbsd-1-4-PATCH001:1.5 netbsd-1-4-RELEASE:1.5 netbsd-1-4:1.5.0.2 netbsd-1-4-base:1.5 netbsd-1-3-PATCH003:1.4 netbsd-1-3-PATCH003-CANDIDATE2:1.4 netbsd-1-3-PATCH003-CANDIDATE1:1.4 netbsd-1-3-PATCH003-CANDIDATE0:1.4 netbsd-1-3-PATCH002:1.4 netbsd-1-3-PATCH001:1.4 netbsd-1-3-RELEASE:1.4 netbsd-1-3-BETA:1.4 netbsd-1-3:1.4.0.2 netbsd-1-3-base:1.4 netbsd-1-2-PATCH001:1.3 netbsd-1-2-RELEASE:1.3 netbsd-1-2-BETA:1.3 netbsd-1-2:1.3.0.6 netbsd-1-2-base:1.3 netbsd-1-1-PATCH001:1.3 netbsd-1-1-RELEASE:1.3 netbsd-1-1:1.3.0.2 netbsd-1-1-base:1.3 lite-2:1.1.1.1 lite-1:1.1.1.1 CSRG:1.1.1 netbsd-1-0-PATCH06:1.2 netbsd-1-0-PATCH05:1.2 netbsd-1-0-PATCH04:1.2 netbsd-1-0-PATCH03:1.2 netbsd-1-0-PATCH02:1.2 netbsd-1-0-PATCH1:1.2 netbsd-1-0-PATCH0:1.2 netbsd-1-0-RELEASE:1.2 netbsd-1-0:1.2.0.2 netbsd-1-0-base:1.2 netbsd-0-9-RELEASE:1.1 netbsd-0-9-BETA:1.1 netbsd-0-9-ALPHA2:1.1 netbsd-0-9-ALPHA:1.1 netbsd-0-9:1.1.0.2 netbsd-0-9-base:1.1 netbsd-0-8:1.1 netbsd-alpha-1:1.1; locks; strict; comment @# @; 1.9 date 2010.05.14.17.10.38; author joerg; state Exp; branches; next 1.8; 1.8 date 2003.08.07.11.14.27; author agc; state Exp; branches; next 1.7; 1.7 date 2002.02.08.01.36.27; author ross; state Exp; branches; next 1.6; 1.6 date 2001.12.01.16.43.18; author wiz; state Exp; branches; next 1.5; 1.5 date 98.04.28.06.00.57; author fair; state Exp; branches; next 1.4; 1.4 date 97.10.19.04.21.27; author lukem; state Exp; branches; next 1.3; 1.3 date 94.12.23.01.10.59; author jtc; state Exp; branches; next 1.2; 1.2 date 93.08.01.07.31.22; author mycroft; state Exp; branches; next 1.1; 1.1 date 93.04.09.12.59.31; author cgd; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 94.12.22.21.08.37; author jtc; state Exp; branches; next ; desc @@ 1.9 log @Reorder sections to canonical order. @ text @.\" $NetBSD: look.1,v 1.8 2003/08/07 11:14:27 agc Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" @@(#)look.1 8.1 (Berkeley) 6/14/93 .\" .Dd June 14, 1993 .Dt LOOK 1 .Os .Sh NAME .Nm look .Nd display lines beginning with a given string .Sh SYNOPSIS .Nm .Op Fl df .Op Fl t Ar termchar .Ar string .Op Ar file .Sh DESCRIPTION The .Nm utility displays any lines in .Ar file which contain .Ar string as a prefix. As .Nm performs a binary search, the lines in .Ar file must be sorted. .Pp If .Ar file is not specified, the file .Pa /usr/share/dict/words is used, only alphanumeric characters are compared and the case of alphabetic characters is ignored. .Pp Options: .Bl -tag -width Ds .It Fl d Dictionary character set and order, i.e. only alphanumeric characters are compared. .It Fl f Ignore the case of alphabetic characters. .It Fl t Specify a string termination character, i.e. only the characters in .Ar string up to and including the first occurrence of .Ar termchar are compared. .El .Pp The .Nm utility exits 0 if one or more lines were found and displayed, 1 if no lines were found, and \*[Gt]1 if an error occurred. .Sh FILES .Bl -tag -width /usr/share/dict/words -compact .It Pa /usr/share/dict/words the dictionary .El .Sh COMPATIBILITY The original manual page stated that tabs and blank characters participated in comparisons when the .Fl d option was specified. This was incorrect and the current man page matches the historic implementation. .Sh SEE ALSO .Xr grep 1 , .Xr sort 1 .Sh HISTORY .Nm appeared in .At v7 . @ 1.8 log @Move UCB-licensed code from 4-clause to 3-clause licence. Patches provided by Joel Baker in PR 22365, verified by myself. @ text @d1 1 a1 1 .\" $NetBSD: look.1,v 1.7 2002/02/08 01:36:27 ross Exp $ a89 3 .Sh SEE ALSO .Xr grep 1 , .Xr sort 1 d97 3 @ 1.7 log @Generate <>& symbolically. I'm avoiding .../dist/... directories for now. @ text @d1 1 a1 1 .\" $NetBSD: look.1,v 1.6 2001/12/01 16:43:18 wiz Exp $ d14 1 a14 5 .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors @ 1.6 log @Whitespace cleanup. @ text @d1 1 a1 1 .\" $NetBSD: look.1,v 1.5 1998/04/28 06:00:57 fair Exp $ d88 1 a88 1 1 if no lines were found, and >1 if an error occurred. @ 1.5 log @Change occurrences of "UNIX" to .Ux or .At as appropriate. @ text @d1 1 a1 1 .\" $NetBSD: look.1,v 1.4 1997/10/19 04:21:27 lukem Exp $ d49 1 a49 1 The @ 1.4 log @WARNSify, fix .Nm usage, getopt returns -1 not EOF, deprecate register @ text @d1 1 a1 1 .\" $NetBSD: look.1,v 1.3 1994/12/23 01:10:59 jtc Exp $ d106 2 a107 1 appeared in Version 7 AT&T Unix. @ 1.3 log @Merged with 4.4lite. Changed to conform to NetBSD's new RCS Id convention. Changed to use err() and errx(). @ text @d1 1 a1 1 .\" $NetBSD: $ d43 1 a43 1 .Nm look d50 1 a50 1 .Nm look d57 1 a57 1 .Nm look d86 1 a86 1 .Nm look d105 1 a105 1 .Nm Look @ 1.2 log @Add RCS indentifiers. @ text @d1 4 a4 2 .\" Copyright (c) 1990 The Regents of the University of California. .\" All rights reserved. d34 1 a34 2 .\" from: @@(#)look.1 6.6 (Berkeley) 7/21/91 .\" $Id: $ d36 1 a36 1 .Dd July 21, 1991 d45 1 d76 7 @ 1.1 log @added, from net/2 (patch 124). @ text @d32 2 a33 1 .\" @@(#)look.1 6.6 (Berkeley) 7/21/91 @ 1.1.1.1 log @imported from 44lite @ text @d1 2 a2 2 .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. d32 1 a32 1 .\" @@(#)look.1 8.1 (Berkeley) 6/14/93 d34 1 a34 1 .Dd June 14, 1993 a42 1 .Op Fl t Ar termchar a72 7 .It Fl t Specify a string termination character, i.e. only the characters in .Ar string up to and including the first occurrence of .Ar termchar are compared. @