elb*_*rna 3 find regular-expression
第一个没有管道的例子返回空。
find /tmp/txz/httperf/httperf-20210403git/ -regextype posix-egrep -regex [A-Z][A-Z]$
Run Code Online (Sandbox Code Playgroud)
第二个返回我想要的,所有带有大写字母的文件,为什么 find 命令什么都不返回?
find /tmp/txz/httperf/httperf-20210403git/ |egrep [A-Z][A-Z]$
/tmp/txz/httperf/httperf-20210403git/.git/refs/remotes/origin/HEAD
/tmp/txz/httperf/httperf-20210403git/.git/logs/refs/remotes/origin/HEAD
/tmp/txz/httperf/httperf-20210403git/.git/logs/HEAD
/tmp/txz/httperf/httperf-20210403git/.git/HEAD
/tmp/txz/httperf/httperf-20210403git/NEWS
/tmp/txz/httperf/httperf-20210403git/COPYRIGHT
/tmp/txz/httperf/httperf-20210403git/AUTHORS
/tmp/txz/httperf/httperf-20210403git/TODO
/tmp/txz/httperf/httperf-20210403git/src/lib/README
Run Code Online (Sandbox Code Playgroud)
我也尝试过正则表达式类型的 posix-extended 和 posix-basic,但返回空。