edit
Replace literal text in a remote UTF-8 file over SSH by specifying the target host, file path, old and new strings.
Instructions
Edit an existing UTF-8 text file by replacing literal text. REMOTE: paths live on selected target (ssh target.ssh); the edit is applied on the remote host. Read the file first (the read-before-edit policy still applies by convention).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | Exact target name from remote_ssh_targets list. Always select the intended host explicitly. | |
| file_path | Yes | Path to edit, on the remote host selected target. A relative path resolves against the target root. | |
| new_string | Yes | Literal replacement text. Use an empty string to delete the match. | |
| old_string | Yes | Literal text to replace. Must match exactly. | |
| replace_all | No | Replace all matches. Defaults to false; when false, old_string must appear exactly once. |