CLI tip 18: inserting file contents using GNU sed

Опубликовано: 22 Июнь 2026
на канале: learnbyexample
38
1

The `r` command accepts a filename as argument and when the address is satisfied, entire contents of the given file is added after the matching line. This is a robust way to add multiline text literally. The `e` flag is the easiest way to insert file contents before the matching lines. Similar to the `r` command, the output of an external command is inserted literally.


This video is based on content from my "GNU sed" ebook: https://github.com/learnbyexample/lea...