$ sed -i 's/a/b/g' file.txt
$ sed -n -e '1,10p' file.txt
| -i | edit files in place instead of printing to stdout |
| -n | suppress automatic printing (use with p) |
| -e | add the next argument as an editing script |
| -E | use extended regular expressions |
| -r | use extended regular expressions (GNU) |
| --in-place | edit files in place |
Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.