Timeline for sed: replace part of text in previous line if match is found
Current License: CC BY-SA 4.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 13, 2024 at 9:37 | comment | added | manero | works great thanks :) | |
| Nov 16, 2018 at 9:44 | comment | added | RudiC | You can see in my sample output that it replaces on matching records, and doesn't if no match. What's different in your input file? Hoppla - cross post. | |
| Nov 16, 2018 at 9:43 | comment | added | mandrake00 | Hi! RudiC. Your fix works. Great! my input file had an issue. It had create_ in one line and test... in the next. Fixed it and it's working fine now. You are a genius. | |
| Nov 16, 2018 at 9:32 | comment | added | mandrake00 | Thank you RudiC. I tried. It replaces only the first occurance in the input text file. output: #create_test -type hard -outer { 1.0000 } { \ psfxxx_16_pi/psfop/deadline_north_re_0 } create_ test -type hard -outer { 0.0000 } { \ psfxxx_16_pi/psfop/deadline_south_re_1 } | |
| Nov 16, 2018 at 9:26 | history | answered | RudiC | CC BY-SA 4.0 |