source: trunk/grep/doc/grep.texi@ 3003

Last change on this file since 3003 was 2557, checked in by bird, 19 years ago

grep 2.5.1a

File size: 77.1 KB
Line 
1\input texinfo @c -*-texinfo-*-
2@c %**start of header
3@setfilename grep.info
4@settitle grep, print lines matching a pattern
5@c %**end of header
6
7@c This file has the new style title page commands.
8@c Run `makeinfo' rather than `texinfo-format-buffer'.
9
10@c smallbook
11
12@c tex
13@c \overfullrule=0pt
14@c end tex
15
16@include version.texi
17
18@c Combine indices.
19@syncodeindex ky cp
20@syncodeindex pg cp
21@syncodeindex tp cp
22
23@defcodeindex op
24@syncodeindex op fn
25@syncodeindex vr fn
26
27@ifinfo
28@direntry
29* grep: (grep). print lines matching a pattern.
30@end direntry
31This file documents @command{grep}, a pattern matching engine.
32
33
34Published by the Free Software Foundation,
3559 Temple Place - Suite 330
36Boston, MA 02111-1307, USA
37
38@c man begin COPYRIGHT
39Copyright @copyright{} 2000, 2001 Free Software Foundation, Inc.
40
41Permission is granted to make and distribute verbatim copies of
42this manual provided the copyright notice and this permission notice
43are preserved on all copies.
44
45@ignore
46Permission is granted to process this file through TeX and print the
47results, provided the printed document carries a copying permission
48notice identical to this one except for the removal of this paragraph
49(this paragraph not being relevant to the printed manual).
50
51@end ignore
52Permission is granted to copy, distribute and/or modify this document
53under the terms of the GNU Free Documentation License, Version 1.1 or
54any later version published by the Free Software Foundation; with the
55Invariant Sections being ``GNU General Public License'' and ``GNU Free
56Documentation License'', with no Front-Cover Texts, and with no
57Back-Cover Texts. A copy of the license is included in the section
58entitled ``GNU Free Documentation License'' (@pxref{Copying}).
59@c man end
60@end ifinfo
61
62@setchapternewpage off
63
64@titlepage
65@title grep, searching for a pattern
66@subtitle version @value{VERSION}, @value{UPDATED}
67@author Alain Magloire et al.
68
69@page
70@vskip 0pt plus 1filll
71Copyright @copyright{} 2000, 2001 Free Software Foundation, Inc.
72
73@sp 2
74Published by the Free Software Foundation, @*
7559 Temple Place - Suite 330, @*
76Boston, MA 02111-1307, USA
77
78Permission is granted to copy, distribute and/or modify this document
79under the terms of the GNU Free Documentation License, Version 1.1 or
80any later version published by the Free Software Foundation; with the
81Invariant Sections being ``GNU General Public License'' and ``GNU Free
82Documentation License'', with no Front-Cover Texts, and with no
83Back-Cover Texts. A copy of the license is included in the section
84entitled ``GNU Free Documentation License''.
85@end titlepage
86
87
88@ifnottex
89@node Top
90@top Grep
91
92@command{grep} searches for lines matching a pattern.
93
94This document was produced for version @value{VERSION} of @sc{gnu}
95@command{grep}.
96@end ifnottex
97
98@menu
99* Introduction:: Introduction.
100* Invoking:: Invoking @command{grep}; description of options.
101* Diagnostics:: Exit status returned by @command{grep}.
102* Grep Programs:: @command{grep} programs.
103* Regular Expressions:: Regular Expressions.
104* Usage:: Examples.
105* Reporting Bugs:: Reporting Bugs.
106* Copying:: License terms.
107* Concept Index:: A menu with all the topics in this manual.
108* Index:: A menu with all @command{grep} commands
109 and command-line options.
110@end menu
111
112
113@node Introduction, Invoking, Top, Top
114@chapter Introduction
115
116@cindex Searching for a pattern.
117
118@command{grep} searches the input files
119for lines containing a match to a given
120pattern list. When it finds a match in a line, it copies the line to standard
121output (by default), or does whatever other sort of output you have requested
122with options.
123
124Though @command{grep} expects to do the matching on text,
125it has no limits on input line length other than available memory,
126and it can match arbitrary characters within a line.
127If the final byte of an input file is not a newline,
128@command{grep} silently supplies one.
129Since newline is also a separator for the list of patterns, there
130is no way to match newline characters in a text.
131
132@node Invoking
133@chapter Invoking @command{grep}
134
135@command{grep} comes with a rich set of options from @sc{posix.2} and @sc{gnu}
136extensions.
137
138@table @samp
139
140@item -c
141@itemx --count
142@opindex -c
143@opindex --count
144@cindex counting lines
145Suppress normal output; instead print a count of matching
146lines for each input file. With the @samp{-v}, @samp{--invert-match} option,
147count non-matching lines.
148
149@item -e @var{pattern}
150@itemx --regexp=@var{pattern}
151@opindex -e
152@opindex --regexp=@var{pattern}
153@cindex pattern list
154Use @var{pattern} as the pattern; useful to protect patterns
155beginning with a @samp{-}.
156
157@item -f @var{file}
158@itemx --file=@var{file}
159@opindex -f
160@opindex --file
161@cindex pattern from file
162Obtain patterns from @var{file}, one per line. The empty
163file contains zero patterns, and therefore matches nothing.
164
165@item -i
166@itemx --ignore-case
167@opindex -i
168@opindex --ignore-case
169@cindex case insensitive search
170Ignore case distinctions in both the pattern and the input files.
171
172@item -l
173@itemx --files-with-matches
174@opindex -l
175@opindex --files-with-matches
176@cindex names of matching files
177Suppress normal output; instead print the name of each input
178file from which output would normally have been printed.
179The scanning of every file will stop on the first match.
180
181@item -n
182@itemx --line-number
183@opindex -n
184@opindex --line-number
185@cindex line numbering
186Prefix each line of output with the line number within its input file.
187
188@item -o
189@itemx --only-matching
190@opindex -o
191@opindex --only-matching
192@cindex only matching
193Print only the part of matching lines that actually matches @var{pattern}.
194
195@item -q
196@itemx --quiet
197@itemx --silent
198@opindex -q
199@opindex --quiet
200@opindex --silent
201@cindex quiet, silent
202Quiet; do not write anything to standard output. Exit immediately with
203zero status if any match is found, even if an error was detected. Also
204see the @samp{-s} or @samp{--no-messages} option.
205
206@item -s
207@itemx --no-messages
208@opindex -s
209@opindex --no-messages
210@cindex suppress error messages
211Suppress error messages about nonexistent or unreadable files.
212Portability note: unlike @sc{gnu} @command{grep}, traditional
213@command{grep} did not conform to @sc{posix.2}, because traditional
214@command{grep} lacked a @samp{-q} option and its @samp{-s} option behaved
215like @sc{gnu} @command{grep}'s @samp{-q} option. Shell scripts intended
216to be portable to traditional @command{grep} should avoid both
217@samp{-q} and @samp{-s} and should redirect
218output to @file{/dev/null} instead.
219
220@item -v
221@itemx --invert-match
222@opindex -v
223@opindex --invert-match
224@cindex invert matching
225@cindex print non-matching lines
226Invert the sense of matching, to select non-matching lines.
227
228@item -x
229@itemx --line-regexp
230@opindex -x
231@opindex --line-regexp
232@cindex match the whole line
233Select only those matches that exactly match the whole line.
234
235@end table
236
237@section @sc{gnu} Extensions
238
239@table @samp
240
241@item -A @var{num}
242@itemx --after-context=@var{num}
243@opindex -A
244@opindex --after-context
245@cindex after context
246@cindex context lines, after match
247Print @var{num} lines of trailing context after matching lines.
248
249@item -B @var{num}
250@itemx --before-context=@var{num}
251@opindex -B
252@opindex --before-context
253@cindex before context
254@cindex context lines, before match
255Print @var{num} lines of leading context before matching lines.
256
257@item -C @var{num}
258@itemx --context=@var{num}
259@opindex -C
260@opindex --context
261@cindex context
262Print @var{num} lines of output context.
263
264@item --colour[=@var{WHEN}]
265@itemx --color[=@var{WHEN}]
266@opindex --colour
267@cindex highlight, color, colour
268The matching string is surrounded by the marker specify in @var{GREP_COLOR}.
269@var{WHEN} may be `never', `always', or `auto'.
270
271@item -@var{num}
272@opindex -NUM
273Same as @samp{--context=@var{num}} lines of leading and trailing
274context. However, grep will never print any given line more than once.
275
276
277@item -V
278@itemx --version
279@opindex -V
280@opindex --version
281@cindex Version, printing
282Print the version number of @command{grep} to the standard output stream.
283This version number should be included in all bug reports.
284
285@item --help
286@opindex --help
287@cindex Usage summary, printing
288Print a usage message briefly summarizing these command-line options
289and the bug-reporting address, then exit.
290
291@itemx --binary-files=@var{type}
292@opindex --binary-files
293@cindex binary files
294If the first few bytes of a file indicate that the file contains binary
295data, assume that the file is of type @var{type}. By default,
296@var{type} is @samp{binary}, and @command{grep} normally outputs either
297a one-line message saying that a binary file matches, or no message if
298there is no match. If @var{type} is @samp{without-match},
299@command{grep} assumes that a binary file does not match;
300this is equivalent to the @samp{-I} option. If @var{type}
301is @samp{text}, @command{grep} processes a binary file as if it were
302text; this is equivalent to the @samp{-a} option.
303@emph{Warning:} @samp{--binary-files=text} might output binary garbage,
304which can have nasty side effects if the output is a terminal and if the
305terminal driver interprets some of it as commands.
306
307@item -b
308@itemx --byte-offset
309@opindex -b
310@opindex --byte-offset
311@cindex byte offset
312Print the byte offset within the input file before each line of output.
313When @command{grep} runs on @sc{ms-dos} or MS-Windows, the printed
314byte offsets
315depend on whether the @samp{-u} (@samp{--unix-byte-offsets}) option is
316used; see below.
317
318@item -D @var{action}
319@itemx --devices=@var{action}
320@opindex -D
321@opindex --devices
322@cindex device search
323If an input file is a device, FIFO or socket, use @var{action} to process it.
324By default, @var{action} is @samp{read}, which means that devices are
325read just as if they were ordinary files.
326If @var{action} is @samp{skip}, devices, FIFOs and sockets are silently
327skipped.
328
329@item -d @var{action}
330@itemx --directories=@var{action}
331@opindex -d
332@opindex --directories
333@cindex directory search
334If an input file is a directory, use @var{action} to process it.
335By default, @var{action} is @samp{read}, which means that directories are
336read just as if they were ordinary files (some operating systems
337and filesystems disallow this, and will cause @command{grep} to print error
338messages for every directory or silently skip them). If @var{action} is
339@samp{skip}, directories are silently skipped. If @var{action} is
340@samp{recurse}, @command{grep} reads all files under each directory,
341recursively; this is equivalent to the @samp{-r} option.
342
343@item -H
344@itemx --with-filename
345@opindex -H
346@opindex --With-filename
347@cindex with filename prefix
348Print the filename for each match.
349
350@item -h
351@itemx --no-filename
352@opindex -h
353@opindex --no-filename
354@cindex no filename prefix
355Suppress the prefixing of filenames on output when multiple files are searched.
356
357@item --line-buffered
358@opindex --line-buffered
359@cindex line buffering
360Set the line buffering policy, this can be a performance penality.
361
362@item --label=@var{LABEL}
363@opindex --label
364@cindex changing name of standard input
365Displays input actually coming from standard input as input coming from file
366@var{LABEL}. This is especially useful for tools like zgrep, e.g.
367@command{gzip -cd foo.gz |grep --label=foo something}
368
369@item -L
370@itemx --files-without-match
371@opindex -L
372@opindex --files-without-match
373@cindex files which don't match
374Suppress normal output; instead print the name of each input
375file from which no output would normally have been printed.
376The scanning of every file will stop on the first match.
377
378@item -a
379@itemx --text
380@opindex -a
381@opindex --text
382@cindex suppress binary data
383@cindex binary files
384Process a binary file as if it were text; this is equivalent to the
385@samp{--binary-files=text} option.
386
387@item -I
388Process a binary file as if it did not contain matching data; this is
389equivalent to the @samp{--binary-files=without-match} option.
390
391@item -w
392@itemx --word-regexp
393@opindex -w
394@opindex --word-regexp
395@cindex matching whole words
396Select only those lines containing matches that form
397whole words. The test is that the matching substring
398must either be at the beginning of the line, or preceded
399by a non-word constituent character. Similarly,
400it must be either at the end of the line or followed by
401a non-word constituent character. Word-constituent
402characters are letters, digits, and the underscore.
403
404@item -r
405@itemx -R
406@itemx --recursive
407@opindex -r
408@opindex --recursive
409@cindex recursive search
410@cindex searching directory trees
411For each directory mentioned in the command line, read and process all
412files in that directory, recursively. This is the same as the
413@samp{--directories=recurse} option.
414
415@item --include=@var{file_pattern}
416@opindex --include
417@cindex include files
418@cindex searching directory trees
419When processing directories recursively, only files matching @var{file_pattern}
420will be search.
421
422@item --exclude=@var{file_pattern}
423@opindex --exclude
424@cindex exclude files
425@cindex searching directory trees
426When processing directories recursively, skip files matching @var{file_pattern}.
427
428@item -m @var{num}
429@itemx --max-count=@var{num}
430@opindex -m
431@opindex --max-count
432@cindex max-count
433Stop reading a file after @var{num} matching lines. If the input is
434standard input from a regular file, and @var{num} matching lines are
435output, @command{grep} ensures that the standard input is positioned to
436just after the last matching line before exiting, regardless of the
437presence of trailing context lines. This enables a calling process
438to resume a search. For example, the following shell script makes use
439of it:
440
441@example
442while grep -m 1 PATTERN
443do
444 echo xxxx
445done < FILE
446@end example
447
448But the following probably will not work because a pipe is not a regular
449file:
450
451@example
452# This probably will not work.
453cat FILE |
454while grep -m 1 PATTERN
455do
456 echo xxxx
457done
458@end example
459
460When @command{grep} stops after NUM matching lines, it outputs
461any trailing context lines. Since context does not include matching
462lines, @command{grep} will stop when it encounters another matching line.
463When the @samp{-c} or @samp{--count} option is also used,
464@command{grep} does not output a count greater than @var{num}.
465When the @samp{-v} or @samp{--invert-match} option is
466also used, @command{grep} stops after outputting @var{num}
467non-matching lines.
468
469@item -y
470@opindex -y
471@cindex case insensitive search, obsolete option
472Obsolete synonym for @samp{-i}.
473
474@item -U
475@itemx --binary
476@opindex -U
477@opindex --binary
478@cindex DOS/Windows binary files
479@cindex binary files, DOS/Windows
480Treat the file(s) as binary. By default, under @sc{ms-dos}
481and MS-Windows, @command{grep} guesses the file type by looking
482at the contents of the first 32kB read from the file.
483If @command{grep} decides the file is a text file, it strips the
484@code{CR} characters from the original file contents (to make
485regular expressions with @code{^} and @code{$} work correctly).
486Specifying @samp{-U} overrules this guesswork, causing all
487files to be read and passed to the matching mechanism
488verbatim; if the file is a text file with @code{CR/LF} pairs
489at the end of each line, this will cause some regular
490expressions to fail. This option has no effect on platforms other than
491@sc{ms-dos} and MS-Windows.
492
493@item -u
494@itemx --unix-byte-offsets
495@opindex -u
496@opindex --unix-byte-offsets
497@cindex DOS byte offsets
498@cindex byte offsets, on DOS/Windows
499Report Unix-style byte offsets. This switch causes
500@command{grep} to report byte offsets as if the file were Unix style
501text file, i.e., the byte offsets ignore the @code{CR} characters which were
502stripped. This will produce results identical to running @command{grep} on
503a Unix machine. This option has no effect unless @samp{-b}
504option is also used; it has no effect on platforms other than @sc{ms-dos} and
505MS-Windows.
506
507@item --mmap
508@opindex --mmap
509@cindex memory mapped input
510If possible, use the @code{mmap} system call to read input, instead of
511the default @code{read} system call. In some situations, @samp{--mmap}
512yields better performance. However, @samp{--mmap} can cause undefined
513behavior (including core dumps) if an input file shrinks while
514@command{grep} is operating, or if an I/O error occurs.
515
516@item -Z
517@itemx --null
518@opindex -Z
519@opindex --null
520@cindex zero-terminated file names
521Output a zero byte (the @sc{ascii} @code{NUL} character) instead of the
522character that normally follows a file name. For example, @samp{grep
523-lZ} outputs a zero byte after each file name instead of the usual
524newline. This option makes the output unambiguous, even in the presence
525of file names containing unusual characters like newlines. This option
526can be used with commands like @samp{find -print0}, @samp{perl -0},
527@samp{sort -z}, and @samp{xargs -0} to process arbitrary file names,
528even those that contain newline characters.
529
530@item -z
531@itemx --null-data
532@opindex -z
533@opindex --null-data
534@cindex zero-terminated lines
535Treat the input as a set of lines, each terminated by a zero byte (the
536@sc{ascii} @code{NUL} character) instead of a newline. Like the @samp{-Z}
537or @samp{--null} option, this option can be used with commands like
538@samp{sort -z} to process arbitrary file names.
539
540@end table
541
542Several additional options control which variant of the @command{grep}
543matching engine is used. @xref{Grep Programs}.
544
545@section Environment Variables
546
547Grep's behavior is affected by the following environment variables.
548
549A locale @code{LC_@var{foo}} is specified by examining the three
550environment variables @env{LC_ALL}, @env{LC_@var{foo}}, and @env{LANG},
551in that order. The first of these variables that is set specifies the
552locale. For example, if @env{LC_ALL} is not set, but @env{LC_MESSAGES}
553is set to @samp{pt_BR}, then Brazilian Portuguese is used for the
554@code{LC_MESSAGES} locale. The C locale is used if none of these
555environment variables are set, or if the locale catalog is not
556installed, or if @command{grep} was not compiled with national language
557support (@sc{nls}).
558
559@cindex environment variables
560
561@table @env
562
563@item GREP_OPTIONS
564@vindex GREP_OPTIONS
565@cindex default options environment variable
566This variable specifies default options to be placed in front of any
567explicit options. For example, if @code{GREP_OPTIONS} is
568@samp{--binary-files=without-match --directories=skip}, @command{grep}
569behaves as if the two options @samp{--binary-files=without-match} and
570@samp{--directories=skip} had been specified before
571any explicit options. Option specifications are separated by
572whitespace. A backslash escapes the next character, so it can be used to
573specify an option containing whitespace or a backslash.
574
575@item GREP_COLOR
576@vindex GREP_COLOR
577@cindex highlight markers
578This variable specifies the surrounding markers use to highlight the matching
579text. The default is control ascii red.
580
581@item LC_ALL
582@itemx LC_COLLATE
583@itemx LANG
584@vindex LC_ALL
585@vindex LC_COLLATE
586@vindex LANG
587@cindex character type
588@cindex national language support
589@cindex NLS
590These variables specify the @code{LC_COLLATE} locale, which determines
591the collating sequence used to interpret range expressions like
592@samp{[a-z]}.
593
594@item LC_ALL
595@itemx LC_CTYPE
596@itemx LANG
597@vindex LC_ALL
598@vindex LC_CTYPE
599@vindex LANG
600@cindex character type
601@cindex national language support
602@cindex NLS
603These variables specify the @code{LC_CTYPE} locale, which determines the
604type of characters, e.g., which characters are whitespace.
605
606@item LC_ALL
607@itemx LC_MESSAGES
608@itemx LANG
609@vindex LC_ALL
610@vindex LC_MESSAGES
611@vindex LANG
612@cindex language of messages
613@cindex message language
614@cindex national language support
615@cindex NLS
616@cindex translation of message language
617These variables specify the @code{LC_MESSAGES} locale, which determines
618the language that @command{grep} uses for messages. The default C
619locale uses American English messages.
620
621@item POSIXLY_CORRECT
622@vindex POSIXLY_CORRECT
623If set, @command{grep} behaves as @sc{posix.2} requires; otherwise,
624@command{grep} behaves more like other @sc{gnu} programs. @sc{posix.2}
625requires that options that
626follow file names must be treated as file names; by default, such
627options are permuted to the front of the operand list and are treated as
628options. Also, @sc{posix.2} requires that unrecognized options be
629diagnosed as
630``illegal'', but since they are not really against the law the default
631is to diagnose them as ``invalid''. @code{POSIXLY_CORRECT} also
632disables @code{_@var{N}_GNU_nonoption_argv_flags_}, described below.
633
634@item _@var{N}_GNU_nonoption_argv_flags_
635@vindex _@var{N}_GNU_nonoption_argv_flags_
636(Here @code{@var{N}} is @command{grep}'s numeric process ID.) If the
637@var{i}th character of this environment variable's value is @samp{1}, do
638not consider the @var{i}th operand of @command{grep} to be an option, even if
639it appears to be one. A shell can put this variable in the environment
640for each command it runs, specifying which operands are the results of
641file name wildcard expansion and therefore should not be treated as
642options. This behavior is available only with the @sc{gnu} C library, and
643only when @code{POSIXLY_CORRECT} is not set.
644
645@end table
646
647@node Diagnostics
648@chapter Diagnostics
649
650Normally, exit status is 0 if selected lines are found and 1 otherwise.
651But the exit status is 2 if an error occurred, unless the @option{-q} or
652@option{--quiet} or @option{--silent} option is used and a selected line
653is found.
654
655@node Grep Programs
656@chapter @command{grep} programs
657
658@command{grep} searches the named input files (or standard input if no
659files are named, or the file name @file{-} is given) for lines containing
660a match to the given pattern. By default, @command{grep} prints the
661matching lines. There are four major variants of @command{grep},
662controlled by the following options.
663
664@table @samp
665
666@item -G
667@itemx --basic-regexp
668@opindex -G
669@opindex --basic-regexp
670@cindex matching basic regular expressions
671Interpret the pattern as a basic regular expression. This is the default.
672
673@item -E
674@itemx --extended-regexp
675@opindex -E
676@opindex --extended-regexp
677@cindex matching extended regular expressions
678Interpret the pattern as an extended regular expression.
679
680@item -F
681@itemx --fixed-strings
682@opindex -F
683@opindex --fixed-strings
684@cindex matching fixed strings
685Interpret the pattern as a list of fixed strings, separated
686by newlines, any of which is to be matched.
687
688@item -P
689@itemx --perl-regexp
690@opindex -P
691@opindex --perl-regexp
692@cindex matching Perl regular expressions
693Interpret the pattern as a Perl regular expression.
694
695@end table
696
697In addition, two variant programs @sc{egrep} and @sc{fgrep} are available.
698@sc{egrep} is the same as @samp{grep -E}. @sc{fgrep} is the
699same as @samp{grep -F}.
700
701@node Regular Expressions
702@chapter Regular Expressions
703@cindex regular expressions
704
705A @dfn{regular expression} is a pattern that describes a set of strings.
706Regular expressions are constructed analogously to arithmetic expressions,
707by using various operators to combine smaller expressions.
708@command{grep} understands two different versions of regular expression
709syntax: ``basic''(BRE) and ``extended''(ERE). In @sc{gnu} @command{grep},
710there is no difference in available functionality using either syntax.
711In other implementations, basic regular expressions are less powerful.
712The following description applies to extended regular expressions;
713differences for basic regular expressions are summarized afterwards.
714
715The fundamental building blocks are the regular expressions that match
716a single character. Most characters, including all letters and digits,
717are regular expressions that match themselves. Any metacharacter
718with special meaning may be quoted by preceding it with a backslash.
719
720A regular expression may be followed by one of several
721repetition operators:
722
723@table @samp
724
725@item .
726@opindex .
727@cindex dot
728@cindex period
729The period @samp{.} matches any single character.
730
731@item ?
732@opindex ?
733@cindex question mark
734@cindex match sub-expression at most once
735The preceding item is optional and will be matched at most once.
736
737@item *
738@opindex *
739@cindex asterisk
740@cindex match sub-expression zero or more times
741The preceding item will be matched zero or more times.
742
743@item +
744@opindex +
745@cindex plus sign
746The preceding item will be matched one or more times.
747
748@item @{@var{n}@}
749@opindex @{n@}
750@cindex braces, one argument
751@cindex match sub-expression n times
752The preceding item is matched exactly @var{n} times.
753
754@item @{@var{n},@}
755@opindex @{n,@}
756@cindex braces, second argument omitted
757@cindex match sub-expression n or more times
758The preceding item is matched n or more times.
759
760@item @{@var{n},@var{m}@}
761@opindex @{n,m@}
762@cindex braces, two arguments
763The preceding item is matched at least @var{n} times, but not more than
764@var{m} times.
765
766@end table
767
768Two regular expressions may be concatenated; the resulting regular
769expression matches any string formed by concatenating two substrings
770that respectively match the concatenated subexpressions.
771
772Two regular expressions may be joined by the infix operator @samp{|}; the
773resulting regular expression matches any string matching either subexpression.
774
775Repetition takes precedence over concatenation, which in turn
776takes precedence over alternation. A whole subexpression may be
777enclosed in parentheses to override these precedence rules.
778
779@section Character Class
780
781@cindex bracket expression
782@cindex character class
783A @dfn{bracket expression} is a list of characters enclosed by @samp{[} and
784@samp{]}. It matches any single character in that list; if the first
785character of the list is the caret @samp{^}, then it matches any character
786@strong{not} in the list. For example, the regular expression
787@samp{[0123456789]} matches any single digit.
788
789@cindex range expression
790Within a bracket expression, a @dfn{range expression} consists of two
791characters separated by a hyphen. It matches any single character that
792sorts between the two characters, inclusive, using the locale's
793collating sequence and character set. For example, in the default C
794locale, @samp{[a-d]} is equivalent to @samp{[abcd]}. Many locales sort
795characters in dictionary order, and in these locales @samp{[a-d]} is
796typically not equivalent to @samp{[abcd]}; it might be equivalent to
797@samp{[aBbCcDd]}, for example. To obtain the traditional interpretation
798of bracket expressions, you can use the C locale by setting the
799@env{LC_ALL} environment variable to the value @samp{C}.
800
801Finally, certain named classes of characters are predefined within
802bracket expressions, as follows.
803Their interpretation depends on the @code{LC_CTYPE} locale; the
804interpretation below is that of the C locale, which is the default
805if no @code{LC_CTYPE} locale is specified.
806
807@cindex classes of characters
808@cindex character classes
809@table @samp
810
811@item [:alnum:]
812@opindex alnum
813@cindex alphanumeric characters
814Alphanumeric characters:
815@samp{[:alpha:]} and @samp{[:digit:]}.
816
817@item [:alpha:]
818@opindex alpha
819@cindex alphabetic characters
820Alphabetic characters:
821@samp{[:lower:]} and @samp{[:upper:]}.
822
823@item [:blank:]
824@opindex blank
825@cindex blank characters
826Blank characters:
827space and tab.
828
829@item [:cntrl:]
830@opindex cntrl
831@cindex control characters
832Control characters. In @sc{ascii}, these characters have octal codes 000
833through 037, and 177 (@code{DEL}). In other character sets, these are
834the equivalent characters, if any.
835
836@item [:digit:]
837@opindex digit
838@cindex digit characters
839@cindex numeric characters
840Digits: @code{0 1 2 3 4 5 6 7 8 9}.
841
842@item [:graph:]
843@opindex graph
844@cindex graphic characters
845Graphical characters:
846@samp{[:alnum:]} and @samp{[:punct:]}.
847
848@item [:lower:]
849@opindex lower
850@cindex lower-case letters
851Lower-case letters:
852@code{a b c d e f g h i j k l m n o p q r s t u v w x y z}.
853
854@item [:print:]
855@opindex print
856@cindex printable characters
857Printable characters:
858@samp{[:alnum:]}, @samp{[:punct:]}, and space.
859
860@item [:punct:]
861@opindex punct
862@cindex punctuation characters
863Punctuation characters:
864@code{!@: " # $ % & ' ( ) * + , - .@: / : ; < = > ?@: @@ [ \ ] ^ _ ` @{ | @} ~}.
865
866@item [:space:]
867@opindex space
868@cindex space characters
869@cindex whitespace characters
870Space characters:
871tab, newline, vertical tab, form feed, carriage return, and space.
872
873@item [:upper:]
874@opindex upper
875@cindex upper-case letters
876Upper-case letters:
877@code{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z}.
878
879@item [:xdigit:]
880@opindex xdigit
881@cindex xdigit class
882@cindex hexadecimal digits
883Hexadecimal digits:
884@code{0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f}.
885
886@end table
887For example, @samp{[[:alnum:]]} means @samp{[0-9A-Za-z]}, except the latter
888depends upon the C locale and the @sc{ascii} character
889encoding, whereas the former is independent of locale and character set.
890(Note that the brackets in these class names are
891part of the symbolic names, and must be included in addition to
892the brackets delimiting the bracket list.)
893
894Most metacharacters lose their special meaning inside lists.
895
896@table @samp
897@item ]
898ends the list if it's not the first list item. So, if you want to make
899the @samp{]} character a list item, you must put it first.
900
901@item [.
902represents the open collating symbol.
903
904@item .]
905represents the close collating symbol.
906
907@item [=
908represents the open equivalence class.
909
910@item =]
911represents the close equivalence class.
912
913@item [:
914represents the open character class followed by a valid character class name.
915
916@item :]
917represents the close character class followed by a valid character class name.
918
919@item -
920represents the range if it's not first or last in a list or the ending point
921of a range.
922
923@item ^
924represents the characters not in the list. If you want to make the @samp{^}
925character a list item, place it anywhere but first.
926
927@end table
928
929@section Backslash Character
930@cindex backslash
931
932The @samp{\} when followed by certain ordinary characters take a special
933meaning :
934
935@table @samp
936
937@item @samp{\b}
938Match the empty string at the edge of a word.
939
940@item @samp{\B}
941Match the empty string provided it's not at the edge of a word.
942
943@item @samp{\<}
944Match the empty string at the beginning of word.
945
946@item @samp{\>}
947Match the empty string at the end of word.
948
949@item @samp{\w}
950Match word constituent, it is a synonym for @samp{[[:alnum:]]}.
951
952@item @samp{\W}
953Match non word constituent, it is a synonym for @samp{[^[:alnum:]]}.
954
955@end table
956
957For example , @samp{\brat\b} matches the separate word @samp{rat},
958@samp{c\Brat\Be} matches @samp{crate}, but @samp{dirty \Brat} doesn't
959match @samp{dirty rat}.
960
961@section Anchoring
962@cindex anchoring
963
964The caret @samp{^} and the dollar sign @samp{$} are metacharacters that
965respectively match the empty string at the beginning and end of a line.
966
967@section Back-reference
968@cindex back-reference
969
970The back-reference @samp{\@var{n}}, where @var{n} is a single digit, matches
971the substring previously matched by the @var{n}th parenthesized subexpression
972of the regular expression. For example, @samp{(a)\1} matches @samp{aa}.
973When use with alternation if the group does not participate in the match, then
974the back-reference makes the whole match fail. For example, @samp{a(.)|b\1}
975will not match @samp{ba}. When multiple regular expressions are given with
976@samp{-e} or from a file @samp{-f file}, the back-referecences are local to
977each expression.
978
979@section Basic vs Extended
980@cindex basic regular expressions
981
982In basic regular expressions the metacharacters @samp{?}, @samp{+},
983@samp{@{}, @samp{|}, @samp{(}, and @samp{)} lose their special meaning;
984instead use the backslashed versions @samp{\?}, @samp{\+}, @samp{\@{},
985@samp{\|}, @samp{\(}, and @samp{\)}.
986
987@cindex interval specifications
988Traditional @command{egrep} did not support the @samp{@{} metacharacter,
989and some @command{egrep} implementations support @samp{\@{} instead, so
990portable scripts should avoid @samp{@{} in @samp{egrep} patterns and
991should use @samp{[@{]} to match a literal @samp{@{}.
992
993@sc{gnu} @command{egrep} attempts to support traditional usage by
994assuming that @samp{@{} is not special if it would be the start of an
995invalid interval specification. For example, the shell command
996@samp{egrep '@{1'} searches for the two-character string @samp{@{1}
997instead of reporting a syntax error in the regular expression.
998@sc{posix.2} allows this behavior as an extension, but portable scripts
999should avoid it.
1000
1001@node Usage
1002@chapter Usage
1003
1004@cindex Usage, examples
1005Here is an example shell command that invokes @sc{gnu} @command{grep}:
1006
1007@example
1008grep -i 'hello.*world' menu.h main.c
1009@end example
1010
1011@noindent
1012This lists all lines in the files @file{menu.h} and @file{main.c} that
1013contain the string @samp{hello} followed by the string @samp{world};
1014this is because @samp{.*} matches zero or more characters within a line.
1015@xref{Regular Expressions}. The @samp{-i} option causes @command{grep}
1016to ignore case, causing it to match the line @samp{Hello, world!}, which
1017it would not otherwise match. @xref{Invoking}, for more details about
1018how to invoke @command{grep}.
1019
1020@cindex Using @command{grep}, Q&A
1021@cindex FAQ about @command{grep} usage
1022Here are some common questions and answers about @command{grep} usage.
1023
1024@enumerate
1025
1026@item
1027How can I list just the names of matching files?
1028
1029@example
1030grep -l 'main' *.c
1031@end example
1032
1033@noindent
1034lists the names of all C files in the current directory whose contents
1035mention @samp{main}.
1036
1037@item
1038How do I search directories recursively?
1039
1040@example
1041grep -r 'hello' /home/gigi
1042@end example
1043
1044@noindent
1045searches for @samp{hello} in all files under the directory
1046@file{/home/gigi}. For more control of which files are searched, use
1047@command{find}, @command{grep} and @command{xargs}. For example,
1048the following command searches only C files:
1049
1050@smallexample
1051find /home/gigi -name '*.c' -print | xargs grep 'hello' /dev/null
1052@end smallexample
1053
1054This differs from the command:
1055
1056@example
1057grep -r 'hello' *.c
1058@end example
1059
1060which merely looks for @samp{hello} in all files in the current
1061directory whose names end in @samp{.c}. Here the @option{-r} is
1062probably unnecessary, as recursion occurs only in the unlikely event
1063that one of @samp{.c} files is a directory.
1064
1065@item
1066What if a pattern has a leading @samp{-}?
1067
1068@example
1069grep -e '--cut here--' *
1070@end example
1071
1072@noindent
1073searches for all lines matching @samp{--cut here--}. Without @samp{-e},
1074@command{grep} would attempt to parse @samp{--cut here--} as a list of
1075options.
1076
1077@item
1078Suppose I want to search for a whole word, not a part of a word?
1079
1080@example
1081grep -w 'hello' *
1082@end example
1083
1084@noindent
1085searches only for instances of @samp{hello} that are entire words; it
1086does not match @samp{Othello}. For more control, use @samp{\<} and
1087@samp{\>} to match the start and end of words. For example:
1088
1089@example
1090grep 'hello\>' *
1091@end example
1092
1093@noindent
1094searches only for words ending in @samp{hello}, so it matches the word
1095@samp{Othello}.
1096
1097@item
1098How do I output context around the matching lines?
1099
1100@example
1101grep -C 2 'hello' *
1102@end example
1103
1104@noindent
1105prints two lines of context around each matching line.
1106
1107@item
1108How do I force grep to print the name of the file?
1109
1110Append @file{/dev/null}:
1111
1112@example
1113grep 'eli' /etc/passwd /dev/null
1114@end example
1115
1116gets you:
1117
1118@smallexample
1119/etc/passwd:eli:DNGUTF58.IMe.:98:11:Eli Smith:/home/do/eli:/bin/bash
1120@end smallexample
1121
1122@item
1123Why do people use strange regular expressions on @command{ps} output?
1124
1125@example
1126ps -ef | grep '[c]ron'
1127@end example
1128
1129If the pattern had been written without the square brackets, it would
1130have matched not only the @command{ps} output line for @command{cron},
1131but also the @command{ps} output line for @command{grep}.
1132Note that some platforms @command{ps} limit the ouput to the width
1133of the screen, grep does not have any limit on the length of a line
1134except the available memory.
1135
1136@item
1137Why does @command{grep} report ``Binary file matches''?
1138
1139If @command{grep} listed all matching ``lines'' from a binary file, it
1140would probably generate output that is not useful, and it might even
1141muck up your display. So @sc{gnu} @command{grep} suppresses output from
1142files that appear to be binary files. To force @sc{gnu} @command{grep}
1143to output lines even from files that appear to be binary, use the
1144@samp{-a} or @samp{--binary-files=text} option. To eliminate the
1145``Binary file matches'' messages, use the @samp{-I} or
1146@samp{--binary-files=without-match} option.
1147
1148@item
1149Why doesn't @samp{grep -lv} print nonmatching file names?
1150
1151@samp{grep -lv} lists the names of all files containing one or more
1152lines that do not match. To list the names of all files that contain no
1153matching lines, use the @samp{-L} or @samp{--files-without-match}
1154option.
1155
1156@item
1157I can do @sc{or} with @samp{|}, but what about @sc{and}?
1158
1159@example
1160grep 'paul' /etc/motd | grep 'franc,ois'
1161@end example
1162
1163@noindent
1164finds all lines that contain both @samp{paul} and @samp{franc,ois}.
1165
1166@item
1167How can I search in both standard input and in files?
1168
1169Use the special file name @samp{-}:
1170
1171@example
1172cat /etc/passwd | grep 'alain' - /etc/motd
1173@end example
1174
1175@item
1176@cindex palindromes
1177How to express palindromes in a regular expression?
1178
1179It can be done by using the back referecences, for example a palindrome
1180of 4 chararcters can be written in BRE.
1181
1182@example
1183grep -w -e '\(.\)\(.\).\2\1' file
1184@end example
1185
1186It matches the word "radar" or "civic".
1187
1188Guglielmo Bondioni proposed a single RE that finds all the palindromes up to 19
1189characters long.
1190
1191@example
1192egrep -e '^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?).?\9\8\7\6\5\4\3\2\1$' file
1193@end example
1194
1195Note this is done by using GNU ERE extensions, it might not be portable on
1196other greps.
1197
1198@item
1199Why are my expressions whith the vertical bar fail?
1200
1201@example
1202/bin/echo "ba" | egrep '(a)\1|(b)\1'
1203@end example
1204
1205The first alternate branch fails then the first group was not in the match
1206this will make the second alternate branch fails. For example, "aaba" will
1207match, the first group participate in the match and can be reuse in the
1208second branch.
1209
1210@item
1211What do @command{grep, fgrep, egrep} stand for ?
1212
1213grep comes from the way line editing was done on Unix. For example,
1214@command{ed} uses this syntax to print a list of matching lines on the screen.
1215
1216@example
1217global/regular expression/print
1218g/re/p
1219@end example
1220
1221@command{fgrep} stands for Fixed @command{grep}, @command{egrep} Extended
1222@command{grep}.
1223
1224@end enumerate
1225
1226@node Reporting Bugs, Copying, Usage, Top
1227@chapter Reporting bugs
1228
1229@cindex Bugs, reporting
1230Email bug reports to @email{bug-grep@@gnu.org}.
1231
1232Large repetition counts in the @samp{@{n,m@}} construct may cause
1233@command{grep} to use lots of memory. In addition, certain other
1234obscure regular expressions require exponential time and
1235space, and may cause grep to run out of memory.
1236Back-references are very slow, and may require exponential time.
1237
1238@node Copying, GNU General Public License, Reporting Bugs, Top
1239@chapter Copying
1240@cindex Copying
1241GNU grep is licensed under the GNU GPL, which makes it @dfn{free
1242software}.
1243
1244Please note that ``free'' in ``free software'' refers to liberty, not
1245price. As some GNU project advocates like to point out, think of ``free
1246speech'' rather than ``free beer''. The exact and legally binding
1247distribution terms are spelled out below; in short, you have the right
1248(freedom) to run and change grep and distribute it to other people, and
1249even---if you want---charge money for doing either. The important
1250restriction is that you have to grant your recipients the same rights
1251and impose the same restrictions.
1252
1253This method of licensing software is also known as @dfn{open source}
1254because, among other things, it makes sure that all recipients will
1255receive the source code along with the program, and be able to improve
1256it. The GNU project prefers the term ``free software'' for reasons
1257outlined at
1258@url{http://www.gnu.org/philosophy/free-software-for-freedom.html}.
1259
1260The exact license terms are defined by this paragraph and the GNU
1261General Public License it refers to:
1262
1263@quotation
1264GNU grep is free software; you can redistribute it and/or modify it
1265under the terms of the GNU General Public License as published by the
1266Free Software Foundation; either version 2 of the License, or (at your
1267option) any later version.
1268
1269GNU grep is distributed in the hope that it will be useful, but WITHOUT
1270ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1271FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1272for more details.
1273
1274A copy of the GNU General Public License is included as part of this
1275manual; if you did not receive it, write to the Free Software
1276Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
1277@end quotation
1278
1279In addition to this, this manual is free in the same sense:
1280
1281@quotation
1282Permission is granted to copy, distribute and/or modify this document
1283under the terms of the GNU Free Documentation License, Version 1.1 or
1284any later version published by the Free Software Foundation; with the
1285Invariant Sections being ``GNU General Public License'' and ``GNU Free
1286Documentation License'', with no Front-Cover Texts, and with no
1287Back-Cover Texts. A copy of the license is included in the section
1288entitled ``GNU Free Documentation License''.
1289@end quotation
1290
1291@c #### Maybe we should wrap these licenses in ifinfo? Stallman says
1292@c that the GFDL needs to be present in the manual, and to me it would
1293@c suck to include the license for the manual and not the license for
1294@c the program.
1295
1296The full texts of the GNU General Public License and of the GNU Free
1297Documentation License are available below.
1298
1299@menu
1300* GNU General Public License:: GNU GPL
1301* GNU Free Documentation License:: GNU FDL
1302@end menu
1303
1304@node GNU General Public License, GNU Free Documentation License, Copying, Copying
1305@section GNU General Public License
1306@center Version 2, June 1991
1307@cindex GPL, GNU General Public License
1308
1309@display
1310Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
1311675 Mass Ave, Cambridge, MA 02139, USA
1312
1313Everyone is permitted to copy and distribute verbatim copies
1314of this license document, but changing it is not allowed.
1315@end display
1316
1317@unnumberedsec Preamble
1318
1319 The licenses for most software are designed to take away your
1320freedom to share and change it. By contrast, the GNU General Public
1321License is intended to guarantee your freedom to share and change free
1322software---to make sure the software is free for all its users. This
1323General Public License applies to most of the Free Software
1324Foundation's software and to any other program whose authors commit to
1325using it. (Some other Free Software Foundation software is covered by
1326the GNU Library General Public License instead.) You can apply it to
1327your programs, too.
1328
1329 When we speak of free software, we are referring to freedom, not
1330price. Our General Public Licenses are designed to make sure that you
1331have the freedom to distribute copies of free software (and charge for
1332this service if you wish), that you receive source code or can get it
1333if you want it, that you can change the software or use pieces of it
1334in new free programs; and that you know you can do these things.
1335
1336 To protect your rights, we need to make restrictions that forbid
1337anyone to deny you these rights or to ask you to surrender the rights.
1338These restrictions translate to certain responsibilities for you if you
1339distribute copies of the software, or if you modify it.
1340
1341 For example, if you distribute copies of such a program, whether
1342gratis or for a fee, you must give the recipients all the rights that
1343you have. You must make sure that they, too, receive or can get the
1344source code. And you must show them these terms so they know their
1345rights.
1346
1347 We protect your rights with two steps: (1) copyright the software, and
1348(2) offer you this license which gives you legal permission to copy,
1349distribute and/or modify the software.
1350
1351 Also, for each author's protection and ours, we want to make certain
1352that everyone understands that there is no warranty for this free
1353software. If the software is modified by someone else and passed on, we
1354want its recipients to know that what they have is not the original, so
1355that any problems introduced by others will not reflect on the original
1356authors' reputations.
1357
1358 Finally, any free program is threatened constantly by software
1359patents. We wish to avoid the danger that redistributors of a free
1360program will individually obtain patent licenses, in effect making the
1361program proprietary. To prevent this, we have made it clear that any
1362patent must be licensed for everyone's free use or not licensed at all.
1363
1364 The precise terms and conditions for copying, distribution and
1365modification follow.
1366
1367@iftex
1368@unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1369@end iftex
1370@ifinfo
1371@center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1372@end ifinfo
1373
1374@enumerate
1375@item
1376This License applies to any program or other work which contains
1377a notice placed by the copyright holder saying it may be distributed
1378under the terms of this General Public License. The ``Program'', below,
1379refers to any such program or work, and a ``work based on the Program''
1380means either the Program or any derivative work under copyright law:
1381that is to say, a work containing the Program or a portion of it,
1382either verbatim or with modifications and/or translated into another
1383language. (Hereinafter, translation is included without limitation in
1384the term ``modification''.) Each licensee is addressed as ``you''.
1385
1386Activities other than copying, distribution and modification are not
1387covered by this License; they are outside its scope. The act of
1388running the Program is not restricted, and the output from the Program
1389is covered only if its contents constitute a work based on the
1390Program (independent of having been made by running the Program).
1391Whether that is true depends on what the Program does.
1392
1393@item
1394You may copy and distribute verbatim copies of the Program's
1395source code as you receive it, in any medium, provided that you
1396conspicuously and appropriately publish on each copy an appropriate
1397copyright notice and disclaimer of warranty; keep intact all the
1398notices that refer to this License and to the absence of any warranty;
1399and give any other recipients of the Program a copy of this License
1400along with the Program.
1401
1402You may charge a fee for the physical act of transferring a copy, and
1403you may at your option offer warranty protection in exchange for a fee.
1404
1405@item
1406You may modify your copy or copies of the Program or any portion
1407of it, thus forming a work based on the Program, and copy and
1408distribute such modifications or work under the terms of Section 1
1409above, provided that you also meet all of these conditions:
1410
1411@enumerate a
1412@item
1413You must cause the modified files to carry prominent notices
1414stating that you changed the files and the date of any change.
1415
1416@item
1417You must cause any work that you distribute or publish, that in
1418whole or in part contains or is derived from the Program or any
1419part thereof, to be licensed as a whole at no charge to all third
1420parties under the terms of this License.
1421
1422@item
1423If the modified program normally reads commands interactively
1424when run, you must cause it, when started running for such
1425interactive use in the most ordinary way, to print or display an
1426announcement including an appropriate copyright notice and a
1427notice that there is no warranty (or else, saying that you provide
1428a warranty) and that users may redistribute the program under
1429these conditions, and telling the user how to view a copy of this
1430License. (Exception: if the Program itself is interactive but
1431does not normally print such an announcement, your work based on
1432the Program is not required to print an announcement.)
1433@end enumerate
1434
1435These requirements apply to the modified work as a whole. If
1436identifiable sections of that work are not derived from the Program,
1437and can be reasonably considered independent and separate works in
1438themselves, then this License, and its terms, do not apply to those
1439sections when you distribute them as separate works. But when you
1440distribute the same sections as part of a whole which is a work based
1441on the Program, the distribution of the whole must be on the terms of
1442this License, whose permissions for other licensees extend to the
1443entire whole, and thus to each and every part regardless of who wrote it.
1444
1445Thus, it is not the intent of this section to claim rights or contest
1446your rights to work written entirely by you; rather, the intent is to
1447exercise the right to control the distribution of derivative or
1448collective works based on the Program.
1449
1450In addition, mere aggregation of another work not based on the Program
1451with the Program (or with a work based on the Program) on a volume of
1452a storage or distribution medium does not bring the other work under
1453the scope of this License.
1454
1455@item
1456You may copy and distribute the Program (or a work based on it,
1457under Section 2) in object code or executable form under the terms of
1458Sections 1 and 2 above provided that you also do one of the following:
1459
1460@enumerate a
1461@item
1462Accompany it with the complete corresponding machine-readable
1463source code, which must be distributed under the terms of Sections
14641 and 2 above on a medium customarily used for software interchange; or,
1465
1466@item
1467Accompany it with a written offer, valid for at least three
1468years, to give any third party, for a charge no more than your
1469cost of physically performing source distribution, a complete
1470machine-readable copy of the corresponding source code, to be
1471distributed under the terms of Sections 1 and 2 above on a medium
1472customarily used for software interchange; or,
1473
1474@item
1475Accompany it with the information you received as to the offer
1476to distribute corresponding source code. (This alternative is
1477allowed only for noncommercial distribution and only if you
1478received the program in object code or executable form with such
1479an offer, in accord with Subsection b above.)
1480@end enumerate
1481
1482The source code for a work means the preferred form of the work for
1483making modifications to it. For an executable work, complete source
1484code means all the source code for all modules it contains, plus any
1485associated interface definition files, plus the scripts used to
1486control compilation and installation of the executable. However, as a
1487special exception, the source code distributed need not include
1488anything that is normally distributed (in either source or binary
1489form) with the major components (compiler, kernel, and so on) of the
1490operating system on which the executable runs, unless that component
1491itself accompanies the executable.
1492
1493If distribution of executable or object code is made by offering
1494access to copy from a designated place, then offering equivalent
1495access to copy the source code from the same place counts as
1496distribution of the source code, even though third parties are not
1497compelled to copy the source along with the object code.
1498
1499@item
1500You may not copy, modify, sublicense, or distribute the Program
1501except as expressly provided under this License. Any attempt
1502otherwise to copy, modify, sublicense or distribute the Program is
1503void, and will automatically terminate your rights under this License.
1504However, parties who have received copies, or rights, from you under
1505this License will not have their licenses terminated so long as such
1506parties remain in full compliance.
1507
1508@item
1509You are not required to accept this License, since you have not
1510signed it. However, nothing else grants you permission to modify or
1511distribute the Program or its derivative works. These actions are
1512prohibited by law if you do not accept this License. Therefore, by
1513modifying or distributing the Program (or any work based on the
1514Program), you indicate your acceptance of this License to do so, and
1515all its terms and conditions for copying, distributing or modifying
1516the Program or works based on it.
1517
1518@item
1519Each time you redistribute the Program (or any work based on the
1520Program), the recipient automatically receives a license from the
1521original licensor to copy, distribute or modify the Program subject to
1522these terms and conditions. You may not impose any further
1523restrictions on the recipients' exercise of the rights granted herein.
1524You are not responsible for enforcing compliance by third parties to
1525this License.
1526
1527@item
1528If, as a consequence of a court judgment or allegation of patent
1529infringement or for any other reason (not limited to patent issues),
1530conditions are imposed on you (whether by court order, agreement or
1531otherwise) that contradict the conditions of this License, they do not
1532excuse you from the conditions of this License. If you cannot
1533distribute so as to satisfy simultaneously your obligations under this
1534License and any other pertinent obligations, then as a consequence you
1535may not distribute the Program at all. For example, if a patent
1536license would not permit royalty-free redistribution of the Program by
1537all those who receive copies directly or indirectly through you, then
1538the only way you could satisfy both it and this License would be to
1539refrain entirely from distribution of the Program.
1540
1541If any portion of this section is held invalid or unenforceable under
1542any particular circumstance, the balance of the section is intended to
1543apply and the section as a whole is intended to apply in other
1544circumstances.
1545
1546It is not the purpose of this section to induce you to infringe any
1547patents or other property right claims or to contest validity of any
1548such claims; this section has the sole purpose of protecting the
1549integrity of the free software distribution system, which is
1550implemented by public license practices. Many people have made
1551generous contributions to the wide range of software distributed
1552through that system in reliance on consistent application of that
1553system; it is up to the author/donor to decide if he or she is willing
1554to distribute software through any other system and a licensee cannot
1555impose that choice.
1556
1557This section is intended to make thoroughly clear what is believed to
1558be a consequence of the rest of this License.
1559
1560@item
1561If the distribution and/or use of the Program is restricted in
1562certain countries either by patents or by copyrighted interfaces, the
1563original copyright holder who places the Program under this License
1564may add an explicit geographical distribution limitation excluding
1565those countries, so that distribution is permitted only in or among
1566countries not thus excluded. In such case, this License incorporates
1567the limitation as if written in the body of this License.
1568
1569@item
1570The Free Software Foundation may publish revised and/or new versions
1571of the General Public License from time to time. Such new versions will
1572be similar in spirit to the present version, but may differ in detail to
1573address new problems or concerns.
1574
1575Each version is given a distinguishing version number. If the Program
1576specifies a version number of this License which applies to it and ``any
1577later version'', you have the option of following the terms and conditions
1578either of that version or of any later version published by the Free
1579Software Foundation. If the Program does not specify a version number of
1580this License, you may choose any version ever published by the Free Software
1581Foundation.
1582
1583@item
1584If you wish to incorporate parts of the Program into other free
1585programs whose distribution conditions are different, write to the author
1586to ask for permission. For software which is copyrighted by the Free
1587Software Foundation, write to the Free Software Foundation; we sometimes
1588make exceptions for this. Our decision will be guided by the two goals
1589of preserving the free status of all derivatives of our free software and
1590of promoting the sharing and reuse of software generally.
1591
1592@iftex
1593@heading NO WARRANTY
1594@end iftex
1595@ifinfo
1596@center NO WARRANTY
1597@end ifinfo
1598@cindex no warranty
1599
1600@item
1601BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
1602FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
1603OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
1604PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
1605OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1606MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
1607TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
1608PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
1609REPAIR OR CORRECTION.
1610
1611@item
1612IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
1613WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
1614REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
1615INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
1616OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
1617TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
1618YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
1619PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
1620POSSIBILITY OF SUCH DAMAGES.
1621@end enumerate
1622
1623@iftex
1624@heading END OF TERMS AND CONDITIONS
1625@end iftex
1626@ifinfo
1627@center END OF TERMS AND CONDITIONS
1628@end ifinfo
1629
1630@page
1631@unnumberedsec How to Apply These Terms to Your New Programs
1632
1633 If you develop a new program, and you want it to be of the greatest
1634possible use to the public, the best way to achieve this is to make it
1635free software which everyone can redistribute and change under these terms.
1636
1637 To do so, attach the following notices to the program. It is safest
1638to attach them to the start of each source file to most effectively
1639convey the exclusion of warranty; and each file should have at least
1640the ``copyright'' line and a pointer to where the full notice is found.
1641
1642@smallexample
1643@var{one line to give the program's name and an idea of what it does.}
1644Copyright (C) 19@var{yy} @var{name of author}
1645
1646This program is free software; you can redistribute it and/or
1647modify it under the terms of the GNU General Public License
1648as published by the Free Software Foundation; either version 2
1649of the License, or (at your option) any later version.
1650
1651This program is distributed in the hope that it will be useful,
1652but WITHOUT ANY WARRANTY; without even the implied warranty of
1653MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1654GNU General Public License for more details.
1655
1656You should have received a copy of the GNU General Public License
1657along with this program; if not, write to the Free Software
1658Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
1659@end smallexample
1660
1661Also add information on how to contact you by electronic and paper mail.
1662
1663If the program is interactive, make it output a short notice like this
1664when it starts in an interactive mode:
1665
1666@smallexample
1667Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}
1668Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
1669type `show w'. This is free software, and you are welcome
1670to redistribute it under certain conditions; type `show c'
1671for details.
1672@end smallexample
1673
1674The hypothetical commands @samp{show w} and @samp{show c} should show
1675the appropriate parts of the General Public License. Of course, the
1676commands you use may be called something other than @samp{show w} and
1677@samp{show c}; they could even be mouse-clicks or menu items---whatever
1678suits your program.
1679
1680You should also get your employer (if you work as a programmer) or your
1681school, if any, to sign a ``copyright disclaimer'' for the program, if
1682necessary. Here is a sample; alter the names:
1683
1684@smallexample
1685@group
1686Yoyodyne, Inc., hereby disclaims all copyright
1687interest in the program `Gnomovision'
1688(which makes passes at compilers) written
1689by James Hacker.
1690
1691@var{signature of Ty Coon}, 1 April 1989
1692Ty Coon, President of Vice
1693@end group
1694@end smallexample
1695
1696This General Public License does not permit incorporating your program into
1697proprietary programs. If your program is a subroutine library, you may
1698consider it more useful to permit linking proprietary applications with the
1699library. If this is what you want to do, use the GNU Library General
1700Public License instead of this License.
1701
1702@node GNU Free Documentation License, Concept Index, GNU General Public License, Copying
1703@section GNU Free Documentation License
1704@center Version 1.1, March 2000
1705@cindex FDL, GNU Free Documentation License
1706
1707@display
1708Copyright (C) 2000 Free Software Foundation, Inc.
170959 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1710
1711Everyone is permitted to copy and distribute verbatim copies
1712of this license document, but changing it is not allowed.
1713@end display
1714@sp 1
1715@enumerate 0
1716@item
1717PREAMBLE
1718
1719The purpose of this License is to make a manual, textbook, or other
1720written document ``free'' in the sense of freedom: to assure everyone
1721the effective freedom to copy and redistribute it, with or without
1722modifying it, either commercially or noncommercially. Secondarily,
1723this License preserves for the author and publisher a way to get
1724credit for their work, while not being considered responsible for
1725modifications made by others.
1726
1727This License is a kind of ``copyleft'', which means that derivative
1728works of the document must themselves be free in the same sense. It
1729complements the GNU General Public License, which is a copyleft
1730license designed for free software.
1731
1732We have designed this License in order to use it for manuals for free
1733software, because free software needs free documentation: a free
1734program should come with manuals providing the same freedoms that the
1735software does. But this License is not limited to software manuals;
1736it can be used for any textual work, regardless of subject matter or
1737whether it is published as a printed book. We recommend this License
1738principally for works whose purpose is instruction or reference.
1739
1740@sp 1
1741@item
1742APPLICABILITY AND DEFINITIONS
1743
1744This License applies to any manual or other work that contains a
1745notice placed by the copyright holder saying it can be distributed
1746under the terms of this License. The ``Document'', below, refers to any
1747such manual or work. Any member of the public is a licensee, and is
1748addressed as ``you''.
1749
1750A ``Modified Version'' of the Document means any work containing the
1751Document or a portion of it, either copied verbatim, or with
1752modifications and/or translated into another language.
1753
1754A ``Secondary Section'' is a named appendix or a front-matter section of
1755the Document that deals exclusively with the relationship of the
1756publishers or authors of the Document to the Document's overall subject
1757(or to related matters) and contains nothing that could fall directly
1758within that overall subject. (For example, if the Document is in part a
1759textbook of mathematics, a Secondary Section may not explain any
1760mathematics.) The relationship could be a matter of historical
1761connection with the subject or with related matters, or of legal,
1762commercial, philosophical, ethical or political position regarding
1763them.
1764
1765The ``Invariant Sections'' are certain Secondary Sections whose titles
1766are designated, as being those of Invariant Sections, in the notice
1767that says that the Document is released under this License.
1768
1769The ``Cover Texts'' are certain short passages of text that are listed,
1770as Front-Cover Texts or Back-Cover Texts, in the notice that says that
1771the Document is released under this License.
1772
1773A ``Transparent'' copy of the Document means a machine-readable copy,
1774represented in a format whose specification is available to the
1775general public, whose contents can be viewed and edited directly and
1776straightforwardly with generic text editors or (for images composed of
1777pixels) generic paint programs or (for drawings) some widely available
1778drawing editor, and that is suitable for input to text formatters or
1779for automatic translation to a variety of formats suitable for input
1780to text formatters. A copy made in an otherwise Transparent file
1781format whose markup has been designed to thwart or discourage
1782subsequent modification by readers is not Transparent. A copy that is
1783not ``Transparent'' is called ``Opaque''.
1784
1785Examples of suitable formats for Transparent copies include plain
1786ASCII without markup, Texinfo input format, LaTeX input format, SGML
1787or XML using a publicly available DTD, and standard-conforming simple
1788HTML designed for human modification. Opaque formats include
1789PostScript, PDF, proprietary formats that can be read and edited only
1790by proprietary word processors, SGML or XML for which the DTD and/or
1791processing tools are not generally available, and the
1792machine-generated HTML produced by some word processors for output
1793purposes only.
1794
1795The ``Title Page'' means, for a printed book, the title page itself,
1796plus such following pages as are needed to hold, legibly, the material
1797this License requires to appear in the title page. For works in
1798formats which do not have any title page as such, ``Title Page'' means
1799the text near the most prominent appearance of the work's title,
1800preceding the beginning of the body of the text.
1801@sp 1
1802@item
1803VERBATIM COPYING
1804
1805You may copy and distribute the Document in any medium, either
1806commercially or noncommercially, provided that this License, the
1807copyright notices, and the license notice saying this License applies
1808to the Document are reproduced in all copies, and that you add no other
1809conditions whatsoever to those of this License. You may not use
1810technical measures to obstruct or control the reading or further
1811copying of the copies you make or distribute. However, you may accept
1812compensation in exchange for copies. If you distribute a large enough
1813number of copies you must also follow the conditions in section 3.
1814
1815You may also lend copies, under the same conditions stated above, and
1816you may publicly display copies.
1817@sp 1
1818@item
1819COPYING IN QUANTITY
1820
1821If you publish printed copies of the Document numbering more than 100,
1822and the Document's license notice requires Cover Texts, you must enclose
1823the copies in covers that carry, clearly and legibly, all these Cover
1824Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
1825the back cover. Both covers must also clearly and legibly identify
1826you as the publisher of these copies. The front cover must present
1827the full title with all words of the title equally prominent and
1828visible. You may add other material on the covers in addition.
1829Copying with changes limited to the covers, as long as they preserve
1830the title of the Document and satisfy these conditions, can be treated
1831as verbatim copying in other respects.
1832
1833If the required texts for either cover are too voluminous to fit
1834legibly, you should put the first ones listed (as many as fit
1835reasonably) on the actual cover, and continue the rest onto adjacent
1836pages.
1837
1838If you publish or distribute Opaque copies of the Document numbering
1839more than 100, you must either include a machine-readable Transparent
1840copy along with each Opaque copy, or state in or with each Opaque copy
1841a publicly-accessible computer-network location containing a complete
1842Transparent copy of the Document, free of added material, which the
1843general network-using public has access to download anonymously at no
1844charge using public-standard network protocols. If you use the latter
1845option, you must take reasonably prudent steps, when you begin
1846distribution of Opaque copies in quantity, to ensure that this
1847Transparent copy will remain thus accessible at the stated location
1848until at least one year after the last time you distribute an Opaque
1849copy (directly or through your agents or retailers) of that edition to
1850the public.
1851
1852It is requested, but not required, that you contact the authors of the
1853Document well before redistributing any large number of copies, to give
1854them a chance to provide you with an updated version of the Document.
1855@sp 1
1856@item
1857MODIFICATIONS
1858
1859You may copy and distribute a Modified Version of the Document under
1860the conditions of sections 2 and 3 above, provided that you release
1861the Modified Version under precisely this License, with the Modified
1862Version filling the role of the Document, thus licensing distribution
1863and modification of the Modified Version to whoever possesses a copy
1864of it. In addition, you must do these things in the Modified Version:
1865
1866A. Use in the Title Page (and on the covers, if any) a title distinct
1867 from that of the Document, and from those of previous versions
1868 (which should, if there were any, be listed in the History section
1869 of the Document). You may use the same title as a previous version
1870 if the original publisher of that version gives permission.@*
1871B. List on the Title Page, as authors, one or more persons or entities
1872 responsible for authorship of the modifications in the Modified
1873 Version, together with at least five of the principal authors of the
1874 Document (all of its principal authors, if it has less than five).@*
1875C. State on the Title page the name of the publisher of the
1876 Modified Version, as the publisher.@*
1877D. Preserve all the copyright notices of the Document.@*
1878E. Add an appropriate copyright notice for your modifications
1879 adjacent to the other copyright notices.@*
1880F. Include, immediately after the copyright notices, a license notice
1881 giving the public permission to use the Modified Version under the
1882 terms of this License, in the form shown in the Addendum below.@*
1883G. Preserve in that license notice the full lists of Invariant Sections
1884 and required Cover Texts given in the Document's license notice.@*
1885H. Include an unaltered copy of this License.@*
1886I. Preserve the section entitled ``History'', and its title, and add to
1887 it an item stating at least the title, year, new authors, and
1888 publisher of the Modified Version as given on the Title Page. If
1889 there is no section entitled ``History'' in the Document, create one
1890 stating the title, year, authors, and publisher of the Document as
1891 given on its Title Page, then add an item describing the Modified
1892 Version as stated in the previous sentence.@*
1893J. Preserve the network location, if any, given in the Document for
1894 public access to a Transparent copy of the Document, and likewise
1895 the network locations given in the Document for previous versions
1896 it was based on. These may be placed in the ``History'' section.
1897 You may omit a network location for a work that was published at
1898 least four years before the Document itself, or if the original
1899 publisher of the version it refers to gives permission.@*
1900K. In any section entitled ``Acknowledgements'' or ``Dedications'',
1901 preserve the section's title, and preserve in the section all the
1902 substance and tone of each of the contributor acknowledgements
1903 and/or dedications given therein.@*
1904L. Preserve all the Invariant Sections of the Document,
1905 unaltered in their text and in their titles. Section numbers
1906 or the equivalent are not considered part of the section titles.@*
1907M. Delete any section entitled ``Endorsements''. Such a section
1908 may not be included in the Modified Version.@*
1909N. Do not retitle any existing section as ``Endorsements''
1910 or to conflict in title with any Invariant Section.@*
1911@sp 1
1912If the Modified Version includes new front-matter sections or
1913appendices that qualify as Secondary Sections and contain no material
1914copied from the Document, you may at your option designate some or all
1915of these sections as invariant. To do this, add their titles to the
1916list of Invariant Sections in the Modified Version's license notice.
1917These titles must be distinct from any other section titles.
1918
1919You may add a section entitled ``Endorsements'', provided it contains
1920nothing but endorsements of your Modified Version by various
1921parties--for example, statements of peer review or that the text has
1922been approved by an organization as the authoritative definition of a
1923standard.
1924
1925You may add a passage of up to five words as a Front-Cover Text, and a
1926passage of up to 25 words as a Back-Cover Text, to the end of the list
1927of Cover Texts in the Modified Version. Only one passage of
1928Front-Cover Text and one of Back-Cover Text may be added by (or
1929through arrangements made by) any one entity. If the Document already
1930includes a cover text for the same cover, previously added by you or
1931by arrangement made by the same entity you are acting on behalf of,
1932you may not add another; but you may replace the old one, on explicit
1933permission from the previous publisher that added the old one.
1934
1935The author(s) and publisher(s) of the Document do not by this License
1936give permission to use their names for publicity for or to assert or
1937imply endorsement of any Modified Version.
1938@sp 1
1939@item
1940COMBINING DOCUMENTS
1941
1942You may combine the Document with other documents released under this
1943License, under the terms defined in section 4 above for modified
1944versions, provided that you include in the combination all of the
1945Invariant Sections of all of the original documents, unmodified, and
1946list them all as Invariant Sections of your combined work in its
1947license notice.
1948
1949The combined work need only contain one copy of this License, and
1950multiple identical Invariant Sections may be replaced with a single
1951copy. If there are multiple Invariant Sections with the same name but
1952different contents, make the title of each such section unique by
1953adding at the end of it, in parentheses, the name of the original
1954author or publisher of that section if known, or else a unique number.
1955Make the same adjustment to the section titles in the list of
1956Invariant Sections in the license notice of the combined work.
1957
1958In the combination, you must combine any sections entitled ``History''
1959in the various original documents, forming one section entitled
1960``History''; likewise combine any sections entitled ``Acknowledgements'',
1961and any sections entitled ``Dedications''. You must delete all sections
1962entitled ``Endorsements.''
1963@sp 1
1964@item
1965COLLECTIONS OF DOCUMENTS
1966
1967You may make a collection consisting of the Document and other documents
1968released under this License, and replace the individual copies of this
1969License in the various documents with a single copy that is included in
1970the collection, provided that you follow the rules of this License for
1971verbatim copying of each of the documents in all other respects.
1972
1973You may extract a single document from such a collection, and distribute
1974it individually under this License, provided you insert a copy of this
1975License into the extracted document, and follow this License in all
1976other respects regarding verbatim copying of that document.
1977@sp 1
1978@item
1979AGGREGATION WITH INDEPENDENT WORKS
1980
1981A compilation of the Document or its derivatives with other separate
1982and independent documents or works, in or on a volume of a storage or
1983distribution medium, does not as a whole count as a Modified Version
1984of the Document, provided no compilation copyright is claimed for the
1985compilation. Such a compilation is called an ``aggregate'', and this
1986License does not apply to the other self-contained works thus compiled
1987with the Document, on account of their being thus compiled, if they
1988are not themselves derivative works of the Document.
1989
1990If the Cover Text requirement of section 3 is applicable to these
1991copies of the Document, then if the Document is less than one quarter
1992of the entire aggregate, the Document's Cover Texts may be placed on
1993covers that surround only the Document within the aggregate.
1994Otherwise they must appear on covers around the whole aggregate.
1995@sp 1
1996@item
1997TRANSLATION
1998
1999Translation is considered a kind of modification, so you may
2000distribute translations of the Document under the terms of section 4.
2001Replacing Invariant Sections with translations requires special
2002permission from their copyright holders, but you may include
2003translations of some or all Invariant Sections in addition to the
2004original versions of these Invariant Sections. You may include a
2005translation of this License provided that you also include the
2006original English version of this License. In case of a disagreement
2007between the translation and the original English version of this
2008License, the original English version will prevail.
2009@sp 1
2010@item
2011TERMINATION
2012
2013You may not copy, modify, sublicense, or distribute the Document except
2014as expressly provided for under this License. Any other attempt to
2015copy, modify, sublicense or distribute the Document is void, and will
2016automatically terminate your rights under this License. However,
2017parties who have received copies, or rights, from you under this
2018License will not have their licenses terminated so long as such
2019parties remain in full compliance.
2020@sp 1
2021@item
2022FUTURE REVISIONS OF THIS LICENSE
2023
2024The Free Software Foundation may publish new, revised versions
2025of the GNU Free Documentation License from time to time. Such new
2026versions will be similar in spirit to the present version, but may
2027differ in detail to address new problems or concerns. See
2028http://www.gnu.org/copyleft/.
2029
2030Each version of the License is given a distinguishing version number.
2031If the Document specifies that a particular numbered version of this
2032License ``or any later version'' applies to it, you have the option of
2033following the terms and conditions either of that specified version or
2034of any later version that has been published (not as a draft) by the
2035Free Software Foundation. If the Document does not specify a version
2036number of this License, you may choose any version ever published (not
2037as a draft) by the Free Software Foundation.
2038
2039@end enumerate
2040
2041@unnumberedsec ADDENDUM: How to use this License for your documents
2042
2043To use this License in a document you have written, include a copy of
2044the License in the document and put the following copyright and
2045license notices just after the title page:
2046
2047@smallexample
2048@group
2049
2050 Copyright (C) @var{year} @var{your name}.
2051 Permission is granted to copy, distribute and/or modify this document
2052 under the terms of the GNU Free Documentation License, Version 1.1
2053 or any later version published by the Free Software Foundation;
2054 with the Invariant Sections being @var{list their titles}, with the
2055 Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}.
2056 A copy of the license is included in the section entitled ``GNU
2057 Free Documentation License''.
2058@end group
2059@end smallexample
2060If you have no Invariant Sections, write ``with no Invariant Sections''
2061instead of saying which ones are invariant. If you have no
2062Front-Cover Texts, write ``no Front-Cover Texts'' instead of
2063``Front-Cover Texts being @var{list}''; likewise for Back-Cover Texts.
2064
2065If your document contains nontrivial examples of program code, we
2066recommend releasing these examples in parallel under your choice of
2067free software license, such as the GNU General Public License,
2068to permit their use in free software.
2069
2070@page
2071@node Concept Index, Index, GNU Free Documentation License, Top
2072@unnumbered Concept Index
2073
2074This is a general index of all issues discussed in this manual, with the
2075exception of the @command{grep} commands and command-line options.
2076
2077@printindex cp
2078
2079@page
2080@node Index,, Concept Index, Top
2081@unnumbered Index
2082
2083This is an alphabetical list of all @command{grep} commands, command-line
2084options, and environment variables.
2085
2086@printindex fn
2087
2088@contents
2089@bye
Note: See TracBrowser for help on using the repository browser.