ssh_file_find_lines_with_pattern
Search a remote file for a pattern (text or regex) and retrieve matching lines with line numbers. Useful for remote log analysis or code inspection.
Instructions
Search for a pattern in a remote file and return matching lines.
Returns: Dictionary with total matches and list of matches (line number and content)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the file to search | |
| pattern | Yes | Text or regex pattern to search for | |
| regex | No | Whether to treat pattern as a regular expression | |
| use_sudo | No | Use sudo for the operation |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||