Timeline for Replace the first occurence of a pattern in a file that may contain a slash
Current License: CC BY-SA 3.0
2 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 22, 2016 at 7:08 | comment | added | Stéphane Chazelas | Or simply (for your second case) awk '!x && sub(ENVIRON["pattern"],"replacement") {x=1};1' | |
| Jul 22, 2016 at 6:59 | history | answered | dave_thompson_085 | CC BY-SA 3.0 |