[bug #58197] "find" fails to optimize "-path /usr/foo -o -path /usr/bar" to "-regex '/usr/\(foo\|bar\)'"

zhoushuiqing <[email protected]>
Newsgroups gmane.comp.gnu.findutils.bugs
Message-ID <[email protected]>
Follow-up Comment #1, bug #58197 (project findutils):

$find ... -regex ".. | .."
$find ... -path.. -o -path ..
they are not the same in the expression tree.

$find -D tree ...
As we can see from the result of this command, -regex on a leaf alone, two
-path on two leaves. While searching for files, every leaf will be applied, so
I think it is reasonable to spend more time...that's just my opinion


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58197>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.