I have a script that reads several debug logs, appends it to a temp file, then does a tail -f
on the debug file so that we can monitor debug events in a single window and easily see when a user action induces an event. There is a bunch of metadata also written to these debug logs that I don't want included in the monitor script's output.
Is there a way I can use sed
or awk
to print only data that's contained within curly braces (including the curly braces)? The data within braces can, and always does, span multiple lines.
Data might look like this:
DON'T PRINT THIS DATA:!@#%$%^
DON'T "!@#()*& PRINT THIS DATA EITHER
}
DON"T PRINT THIS
{
PRINT THIS DATA BLOCK
AND THIS DATA
AND THIS LINE TOO:!@#(*&
}
DONT:!@# \/PRINT THIS
{
BUT PRINT THIS
}