mirror of
https://github.com/Mastermindzh/examples.git
synced 2024-10-22 19:37:34 +02:00
13 lines
696 B
Bash
13 lines
696 B
Bash
## 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"
|