Skip to content
This repository was archived by the owner on Jun 5, 2024. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gnu_sed.md
Original file line number Diff line number Diff line change
Expand Up @@ -2533,7 +2533,7 @@ $ sed -n '/blue/{n;n;s/e/E/pg}' poem.txt
And so arE you.
```

* `N` will fetch the next line and append to pattern space
* `N` will fetch the current matched line and next line after and append to pattern space
* See [this Q&A](https://stackoverflow.com/questions/40229578/how-to-insert-a-line-feed-into-a-sed-line-concatenation) for an interesting case of applying substitution every 4 lines but excluding the 4th line

```bash
Expand Down