grep - What does "[chS]" mean in the regex of this shell command? -


egrep -r --include "*.[chs]" "myregularexpression" . 

what [chs] mean in shell command above?

that part of shell globbing selects multiple files.

the expression [chs] matches single character containing value c, h, or s.

so, glob "*.[chs]" looking files have extension .c, .h, or .s


Comments

Popular posts from this blog

javascript - JS causing window size to be bigger than necessary - Dropdown bug -

php - Calling a template part from a post -

How to mention the localhost in android -