grep_file
Search for text patterns in remote files over SSH. Specify a path and pattern to locate matches with line numbers and context.
Instructions
Search for a text pattern in remote files.
Args: path: File path or directory to search. pattern: Text or regex pattern to search for. recursive: Search recursively in directories (default False). ignore_case: Case-insensitive search (default True). context_lines: Lines of context around each match (default 2). host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Matching lines with file names and line numbers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| pattern | Yes | ||
| host_name | No | ||
| recursive | No | ||
| ignore_case | No | ||
| context_lines | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |