From Simson Garfinkel
Jump to navigationJump to search
Revision as of 14:46, 1 June 2009 by Simson (New page: <pre> NAME aigrep - search a file for an idea SYNOPSIS aigrep [ option ] ... idea [ file ] ... DESCRIPTION The aigrep command will search the input files (standard i...)
NAME aigrep - search a file for an idea SYNOPSIS aigrep [ option ] ... idea [ file ] ... DESCRIPTION The aigrep command will search the input files (standard input default) for lines containing the idea. Normally, each line found is copied to the standard output. Aigrep ideas are limited to English; the program uses a compact nondeterministic algorithm. The following options are recognized. -v All ideas but those matching are printed. -x (Exact) Only lines containing exactly the idea and nothing else are printed. -c Only a count of matching lines is printed. -l The names of files with matching lines are listed (once) separated by newlines. -n Each line is preceded by its relative line number in the file. -b Each line is preceded by the block number on which it was found. This is sometimes useful in locating disk block numbers by context. -i The case of letters is ignored in making comparisons - that is, upper and lower case are considered identical. This applies to grep and fgrep only. -s Silent mode. Nothing is printed (except error mes- sages). This is useful for checking the error status. -e idea Same as a simple idea argument, but useful when the idea begins with a -. -f file The idea is taken from the file. In all cases the file name is shown if there is more than one input file. Care should be taken when specifying ideas containing words with pronouns, as they are sometimes susceptable to multiple interpertations. It is safest to use only proper nouns in the idea expression. SEE ALSO doctor(1), lisp(1) DIAGNOSTICS Exit status is 0 if any matches are found, 1 if none, 2 for syntax errors or inaccessible files.