mirror of
https://github.com/Fechin/reference.git
synced 2026-11-21 13:34:06 +03:00
Revert "Revert "sed: insert lines from file""
This reverts commit fd246b58d6.
This commit is contained in:
1 parent
fd246b58d6
commit
25a8b5593b
1 file changed
+8
@@ -257,6 +257,14 @@ Insert "Example: " before each line that contains "hello"
|
||||
```shell script
|
||||
$ sed '/hello/i Example: ' file.txt
|
||||
```
|
||||
Insert lines from file1 before line 5
|
||||
```shell script
|
||||
$ sed '5 r file1' file.txt
|
||||
```
|
||||
Insert lines from file1 after the line that starts with "hello"
|
||||
```shell script
|
||||
$ sed '/^hello/ r file1' file.txt
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user