0

wgrep works well for every line in context search like grep -C 2. It also works for grepmail, special grep-like program for mailboxes. You can edit each line of output.

How to force pcregrep with multiline request like ^[ \t]+-.*\n +CLOCK to cooperate with wgrep correctly (with ability to edit each line, not only the first)?

artscan
  • 445
  • 3
  • 12

1 Answers1

0

I have created such one-liner

f=filename(s).org; diff --unchanged-group-format='' <(grep -i -nH -e  [.]* ${f}) <(pcregrep -v -M -nH -e "^[ \t]+-.*\n +CLOCK" ${f})

which is used instead of grep command in grep-mode.

artscan
  • 445
  • 3
  • 12
  • If this post resolves the problem, please accept your own answer so we can mark it as done. – Dan Apr 24 '16 at 01:59