By far the most common usage of
sed is to perform a simple pattern replacement:
sed -e 's/pattern/replacement/g'
- GNU sed user's manual
- THE SED FAQ
- Is there a basic tutorial for grep, awk and sed?
- How to remove multiple lines per occurrence in a file?
- How to ensure that string interpolated into `sed` substitution escapes all metachars
- sed one-liner to delete any line that does not contain lowercase letters
- How to append end of every line with the line itself
- sed: get 2 lines from a single one
- Return only the portion of a line after a matching pattern
- Extracting a regex matched with 'sed' without printing the surrounding characters