find . -name "*.[hc]|*.cc"
The above doesn't work,why?
How do I find these 3 kinds of files with a single pattern?
It doesn't work because
You could do it with the default emacs regexes, I'm sure; I don't use them or know the main differences so I picked the one I know.
If you really want to use a single shellglob, you're out of luck: the only syntax for multiple strings is
|show 9 more comments|
If you really want to use a regex then
should do the trick but the more normal way to do this is to use -o as already demonstrated.
|show 1 more comment|