I want to extract the logs between the current timestamp and 30 minutes before. I developed the below script but it's not working properly it shows only timestamp lines whereas I have to get untimestamped log lines in between such timestamped line. I have a log file containing this pattern:
script:
awk -v TSTART="$(date -v -30M "+%Y-%m-%d %H:%M")" -v TEND="$(date "+%Y-%m-%d %H:%M")" '$0>=TSTART && $0<=TEND' webservice_logs.log
Log file pattern: