reading a tagged log
by Rosemary-Lane from LinuxQuestions.org on (#6M7ES)
I have a log file with simple(no meta characters) text lines. Each entry starts with a + followed by the name of the person who added an entry to the log. So for example:
+Alan
line1
line2
more lines
some blanks lines
+David
line
more lines
still more lines
+Alan
...
...
+Chris
..
..
What is a good way to filter out all the entries by, say,Alan? Blank lines must be maintained as part of the entry.
+Alan
line1
line2
more lines
some blanks lines
+David
line
more lines
still more lines
+Alan
...
...
+Chris
..
..
What is a good way to filter out all the entries by, say,Alan? Blank lines must be maintained as part of the entry.