Here is the 1-Step solution:
Step 1: Add Returns shell script condition to rule.
- Code: Select all
exit $([ $(grep -ci "the text that you want to find" "$1") -gt 0 ])
This script will match a file (i.e. return 0) when text you want to find is found at least once within the text of the file being matched.
EDIT - enclosed $1 in quotes to prevent unescaped path errors.