grep.com

Author: (Norbert) Suedland, Aalen, Germany

A search programme in source texts, which needs an extension to Unicode, and by this is a programming task for the beginning.

The possible control parameters are ascertained by a call (with argument ?) of:

grep.com ?
where the English explanation reads the following:
Turbo grep 5.0 Copyright © 1992, 1997 Borland International
Syntax: grep [-rlcnvidzuwo] search_string file[s]

Options are one or more option characters, preceeded by "-", and optionally followed by "+" (turn option on), or "-" (turn it off). The default is "+".
-r+ regular expression search -l- file names only
-c- match count only -n- line numbers
-v- non-matching lines only -i- ignore case
-d- search in subdirectories, too -z- detailed search report
-u- new_file_name update options -w- word search
-o- UNIX output format default set: [0-9A-Z_]

A regular search expression is one or more occurences of: One or more characters, optionally enclosed in quotes. The following symbols are treated specially:
^ start of a line $ end of a line
. any character \ quote the next character
* match zero times or more + match once or more
[aeiou0-9] match a, e, i, o, u, and 0 through 9
[^aeiou0-9] matching anything, except for a, e, i, o, u, or 0 through 9

Whether in case of a translation of this programme into other languages also all option characters are to be translated, can be discussed.

The following call finds a connection to the starting function wmain (wide_main_function) for Unicode characters under Windows:

grep.exe -diw wmain \Borland\BC5\*.*

bcc32.exe (next contribution) Table of Contents tlib.exe (previous contribution)
Deutsche Fassung Esperanta versio