In my grep version, exclude/include switches only apply to files:
--include=PATTERN
Recurse in directories only searching file matching PATTERN.
--exclude=PATTERN
Recurse in directories skip file matching PATTERN.
Thanks.
Maoz
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
The Unix philosophy would be to use programs that do one thing well.
In this case 'find' is IMNHO the better model. The 'find' command is
specifically designed to traverse directory hierarchies in whatever
way that you want and to interface to other utilities easily.
find . -name FOODIR -prune -o -type f -exec grep PATTERN {} +
Bob