[image of the Head of a GNU]

Table of Contents

Introduction to Bool

GNU Bool is a utility for finding files that match a boolean expression.

The boolean operators supported are AND, OR and NOT. Also supported is the NEAR operator for locating two expressions within a short distance from each other.

The text processing algorithm understands that newlines don't always mean the end of a sentence. Therefore, the string "afternoon sun" matches "afternoon\nsun" (notice the newline) because adjacent lines are assumed to be in the same context. On the other hand, two newlines would not match because they normally indicate a new paragraph which means a different context. The dash character is also supported to separate words before a newline, so the string "after-\nnoon sun" would match.

The HTML processing algorithm understands many features of the HTML 4.01 standard. Entities such as &eacute; are supported in decimal as &#233; or in hexadecimal as &#xE9;. Elements also retain their structural meaning where the string "daytime" matches "<b>day</b>time" because the bold text style does not separate words. On the other hand, "<p>day</p><p>time</p>" does not match because paragraphs separate context.

Downloading Bool

Bool can be found on or one of the mirrors. You can also order a CD-ROM from the FSF or use other methods to obtain a copy.

Related Software

For matching regular expressions, see GNU grep.

Return to GNU's home page.

Please send FSF & GNU inquiries & questions to There are also other ways to contact the FSF.

Please send comments on these web pages to, send other questions to

Copyright (C) 2001 Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.

Updated: 8 May 2001 intmktg