grep scans file(s) looking for a given pattern. This pattern is not
an Unix regexp, but an AmigaDOS pattern; * can be used everywhere as
synonim of #?. Wildcard characters are allowed in the file name(s),
everywhere BUT NOT in the device part-e.g. DF0:*/*.c BUT NOT DF*:... .
The options can be specified alone or together, e.g. grep -i -l ...
or grep -il ... . Example: grep -il assign s:*
GREP Usage: grep [options] pattern [ File [ File [ ... ]]
Purpose: Searches files (a pattern can be given in the file
name(s)) for lines containing a given pattern (with
the AmigaDOS conventions). If no file names are
given, grep assumes standard input.
Exit status is 0 if any matches are found, 5
(warning) if none, 10 (error) for unreadable files
or other errors.
Options: -c Print only the number of the matching lines;
-i Ignore upper/lower case distinctions in the
comparison;
-l Print the name of the files with matching lines
(once);
-n Precede each line by its line number;
-v Print all lines except those that contain the
pattern.
|