Living in the Shell #14; sed (Text Stream Editor) (Part 1)

sed ๐๏ธ
Edits streams by applying commonly used modifications.
Add a new line a & i
cat some-file.txt | sed '3a This is a new line after the 3rd line'
cat some-file.txt | sed '3i This is a new line before the 3rd line'
Append a new line to the end $a
cat some-file.txt | sed '$a Now, this is the last line'
Prepend a new line to the beginning 1i
cat some-file.txt | sed '1i Now, this is the first line'
Replace one or more lines c
cat some-file.txt | sed '1-3c BOOM'
Replaces lines 1 through 3, with 'BOOM'.
Delete one or more lines d
cat some-file.txt | sed '1-3d'
Deletes lines 1 through 3.
![Godoc-Lint: a linter for Go Doc Comments (godocs) [RE#16]](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1741533596295%2F731ef95a-1af8-49ae-843d-a19d9d418fdf.png&w=3840&q=75)
![Optimize Postgres Containers for Testing [RE#15]](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1741533395875%2Fe1a3c4fc-4354-4482-88b8-e8c14750e00a.png&w=3840&q=75)

