Hello, guys!
"filename" has blocks with three lines each in this fashion:
93909286
#verified
has one bug
10909286
#unverified
pending
10909286
#unverified
pending
The above example has duplicate blocks, and I have tried using sed to remove just one block... The following piece of code removes all matching blocks, but I want to have only the duplicates removed:
sed -i '/^10909286$/,+2 d' filename
The following awk code has the same problem as the sed one, besides not being able to edit the file inline as "sed -i", but I could workaround it:
awk '/^10909286$/{c=3};--c<0' filename
Any ideas?
Thank you!