sed2¶
Stream editor for filtering and transforming text.
Synopsis¶
Description¶
A sed-like stream editor with modern, readable syntax. Replace occurrences of a pattern with a replacement string.
Flags¶
| Flag | Short | Description | Default |
|---|---|---|---|
--search-type |
-t |
Pattern type: literal, regex |
regex |
--in-place |
-i |
Edit files in place | false |
--ignore-case |
-I |
Case-insensitive search | false |
--global |
-g |
Replace all occurrences on each line | false |
Examples¶
Replace first occurrence on each line:
Replace all occurrences (global):
Case-insensitive replacement:
Edit file in place:
Use literal string (not regex):
Regex with capture groups:
Read from stdin:
Process multiple files: