mirror of
https://github.com/Mastermindzh/examples.git
synced 2025-09-02 22:14:31 +02:00
find in glob, ignore glob added
This commit is contained in:
12
bash/find-all-without.sh
Normal file
12
bash/find-all-without.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
## this script shows you how to find files matching a certain glob (*.csproj) but ignoring another glob (*.test.csproj)
|
||||
|
||||
CSPROJFILE=$(find . -iname '*.csproj' -a ! -iname '*test.csproj')
|
||||
# ^ ^ ^ ^ ^ ^ ^
|
||||
# assign var | | | | | |
|
||||
# find | | | | |
|
||||
# case insensitive search | | | |
|
||||
# ending with *.csproj | | |
|
||||
# logical and not | |
|
||||
# case insensitive name search |
|
||||
# ending with test.csproj
|
||||
echo "$CSPROJFILE"
|
Reference in New Issue
Block a user