Signal9Signal9 — home
online
back to labs

Regex: Anchor to Line End ($)

EasyRegular Expressions3-5 min
The brief

Extract lines that END with '.log' from /root/work/files.txt into /root/work/out.txt.

Be precise about the ending: 'app.log.bak' finishes with '.bak', not '.log', so it must not appear in your output.

What you'll do
  • out.txt holds exactly the lines ending in '.log'

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