Keep only values that match a pattern.
Section: Wildcards and file discovery
filter files by pattern
makefile
makefile
TESTS := $(filter %_test.py,$(FILES))Explanation
Useful for selecting subsets of a list.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Wildcards and file discovery