sed_add
Add sed expressions to a batch queue for a file on an OpenWrt router. Edits accumulate until execution, enabling complex multi-edit operations to be built and applied efficiently.
Instructions
Add one or more sed expressions to the batch queue for a file. Expressions are NOT executed immediately — they accumulate until sed_execute is called. This allows building up complex multi-edit operations efficiently.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the target file on the router | |
| expressions | Yes | Array of sed expressions to queue. Examples: 's/old/new/g' (substitute), '5d' (delete line 5), '3i\\new line' (insert before line 3), '$a\\appended line' (append at end), '10,20s/foo/bar/' (substitute in line range) |