sed_multifile
Apply sed patterns to multiple files matching a glob pattern in a specified directory. Create backups to ensure changes are secure and reversible.
Instructions
Apply sed pattern to multiple files matching a glob pattern
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| backup | No | Create backup files | |
| directory | No | Starting directory for search | . |
| filePattern | Yes | File glob pattern (e.g., "*.ts", "src/**/*.js") | |
| pattern | Yes | Sed pattern to apply |
Input Schema (JSON Schema)
{
"properties": {
"backup": {
"default": true,
"description": "Create backup files",
"type": "boolean"
},
"directory": {
"default": ".",
"description": "Starting directory for search",
"type": "string"
},
"filePattern": {
"description": "File glob pattern (e.g., \"*.ts\", \"src/**/*.js\")",
"type": "string"
},
"pattern": {
"description": "Sed pattern to apply",
"type": "string"
}
},
"required": [
"pattern",
"filePattern"
],
"type": "object"
}