[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
find improvement wish
From: |
Chun Yip Wong |
Subject: |
find improvement wish |
Date: |
Mon, 8 Feb 2021 07:31:07 +0800 |
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
- find improvement wish,
Chun Yip Wong <=