find . -name "*.[hc]|*.cc"
The above doesn't work,why?
UPDATE
How do I find these 3 kinds of files with a single pattern?
The above doesn't work,why? UPDATE How do I find these 3 kinds of files with a single pattern?
| ||||
|
feedback
|
|
It doesn't work because
Edit
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 | |||||||||||||
feedback
|
|
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. | |||||||||||
feedback
|