Using GNU grep 2.6.3 in fedora 11.

$echo patH/To/header.h | grep   -E '.*/[G-H].*\.h'
patH/To/header.h
$
Apparently it matches an empty string, because adding the -o option
produces no output.

$echo patH/To/header.h | grep   -E '.*/[GH].*\.h'
$
There is no output here.

Originally I wanted to find all files with capital letters in their
names, for which I used something like:
$find . | grep   -E '.*/[^/]*[A-Z][^/]*\.h'
but it kept printing some files without capitals.

Regards,
Michal

Reply via email to