find improvement wish
Chun Yip Wong <[email protected]>
| Newsgroups | gmane.comp.gnu.findutils.bugs |
|---|---|
| Message-ID | <CADRLgsy-dcrugL_2ub2Q3A5r3oaHueOx3yJypUQA6Hbe7hzxnw@mail.gmail.com> |
Dear, I prefer using find with script in this way: find $dir $pattern.where pattern=" -name *.sh ! -name *.txt ... etc." The built findutils version is 4.7. it fails to work with such message find: paths must precede expression: 'test.sh' find: possible unquoted pattern after predicate '-name' I know when there are multiple files, such as a.txt b.txt c.txt, find . -name *.txt will cause such messages and solve with quoted the '*.txt' It is more convenient to define a pattern and no need to quote all extensions one by one, line by line using scripts. Thanks