Timeline for How to grep -v and also exclude the next line after the match?
Current License: CC BY-SA 3.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 11, 2015 at 19:39 | comment | added | jimmij | @arielf grep doesn't support -M option. | |
| Sep 11, 2015 at 4:44 | comment | added | arielf | Given that (GNU) grep already supports PCRE (via the -P option), what is the advantage of using pcregrep? | |
| Aug 30, 2015 at 8:22 | comment | added | don_crissti | It's quite obvious the OPs sample & question don't cover such cases, I'm just curious to know how this works (I'm not familiar with pcre) because with an odd number of consecutive lines that match, this works (it removes the context line too) and with an even number of consecutive lines that match, it fails (it doesn't remove the context line after). | |
| Aug 29, 2015 at 23:35 | comment | added | jimmij | @don_crissti Both lines will be removed. OP's specification doesn't cover this case. | |
| Aug 29, 2015 at 23:12 | history | answered | jimmij | CC BY-SA 3.0 |