sd [-p|--preview]
[-F|--fixed-strings] [-n|--max-replacements]
[-f|--flags] [-h|--help]
[-V|--version] <FIND> <REPLACE_WITH>
[FILES]
- -p, --preview
- Display changes in a human reviewable format (the specifics of the format
are likely to change in the future)
- -F,
--fixed-strings
- Treat FIND and REPLACE_WITH args as literal strings
- -n,
--max-replacements=LIMIT [default: 0]
- Limit the number of replacements that can occur per file. 0 indicates
unlimited replacements
- -f,
--flags=FLAGS
- Regex flags. May be combined (like `-f mc`).
c - case-sensitive
e - disable multi-line matching
i - case-insensitive
m - multi-line matching
s - make `.` match newlines
w - match full words only
- -h, --help
- Print help (see a summary with '-h')
- -V, --version
- Print version
- <FIND>
- The regexp or string (if using `-F`) to search for
- <REPLACE_WITH>
- What to replace each match with. Unless in string mode, you may use
captured values like $1, $2, etc
- [FILES]
- The path to file(s). This is optional - sd can also read from STDIN.
Note: sd modifies files in-place by default. See documentation
for examples.
- 0
- Successful program execution.
- 1
- Unsuccessful program execution.
- 101
- The program panicked.