Timeline for How can I delete everything between two markers in a file?
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 4, 2015 at 17:30 | comment | added | Stéphane Chazelas | @user10324, it's doable in sed (at least with the GNU implementation), but a lot easier with perl or gawk which will also be installed on your standard Linux machine. | |
| Nov 4, 2015 at 17:26 | comment | added | l7ll7 | @StéphaneChazelas So, you mean it is not feasable to do it ? | |
| Nov 4, 2015 at 17:22 | comment | added | Stéphane Chazelas | That assumes GNU sed and that there's only one such section to remove in the input (as that will remove anything from the first occurrence of the begin marker to the last occurrence of the end marker). | |
| Nov 4, 2015 at 17:22 | comment | added | l7ll7 | I tested this approach, is there some way to preserve the line breaks ? A more general input in my question was edited, to make clear, what I want. | |
| Nov 4, 2015 at 17:02 | history | edited | LilloX | CC BY-SA 3.0 | added 11 characters in body |
| Nov 4, 2015 at 16:54 | history | answered | LilloX | CC BY-SA 3.0 |