grep_count
Count occurrences of a specific pattern in files or directories using regex or plain text, with options for case sensitivity, whole-word matches, and per-file counts.
Instructions
Count the number of matches for a pattern
Input Schema
Name | Required | Description | Default |
---|---|---|---|
by_file | No | Show count per file when searching directories | |
case_sensitive | No | Whether the search should be case sensitive | |
file_extensions | No | Only search files with these extensions | |
pattern | Yes | Regular expression pattern or plain text to count | |
target | Yes | File or directory path to search in | |
whole_words | No | Match whole words only |