|
|
\nwhere n in range 0-9, \n matches the n-th
subexpression found in this line
this command scans all the characters in the files specified,
and prints out every line that contains at least one
match with the regular expression 'regex' given.
e.g.
cd /usr/include
grep '.printf' *.h
scans all the .h files and prints out lines containing .printf
Note you need the single quotes here, since the regular
expression contains the special symbol [.]
Remember that UNIX is a line-oriented operating system--
really all the utilities work on text files, on a line by
line basis.
|
|