小弟我想从git status 的数据结果中只将后缀名是*c和*h的文件显示 Home » IDC云服务 » 小弟我想从git status 的数据结果中只将后缀名是*c和*h的文件显示 我想从git status 的数据结果中只将后缀名是*.c和*.h的文件显示git status | grep ??? 非常感谢 git status | grep "\.[hc]$"git status | grep "\.[hc]\b" 之前一直忽略了一个问题 . 是特殊字符,所以需要使用 \ 去转换。