fastmod icon indicating copy to clipboard operation
fastmod copied to clipboard

Allow deletion

Open sluongng opened this issue 4 years ago • 1 comments

when I was trying to remove a matched set of configurations, I realized that fastmod default replacing the config with an empty line instead:

fastmod 'some-matching-config.*\n.*\n.*\n' ''

It would be nice to have a --delete flag that, instead of replacing existing matches with an empty line, it would just delete the matching lines.

sluongng avatar Sep 10 '21 11:09 sluongng

Fastmod doesn't try to insert extra lines, it just does the replacement you specify. Couple potential fixes:

  1. Did you try the -m option?
  2. Perhaps you needed to match and remove one extra newline character?

swolchok avatar Sep 14 '21 19:09 swolchok

closing because there has been no reply for almost 1 year; feel free to reply and reopen if my suggestions did not help

swolchok avatar Sep 06 '22 17:09 swolchok