Signal9Signal9 — home
online
back to labs

Awk: Conditional Field Logic

MediumSed & Awk5-10 min
The brief

/root/work/events.log has 'timestamp severity message' columns.

Extract only the ERROR events — lines whose severity column is exactly 'ERROR' — into /root/work/out.txt.

Exactness matters: a line mentioning 'ERROR' in its message but with severity WARN must NOT be included, and a severity of 'ERRORLEVEL' is not a match either.

What you'll do
  • Select lines whose severity column is exactly 'ERROR', not a substring match
  • Save those lines to /root/work/out.txt

Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.