Signal9Signal9 — home
online
back to labs

Sed: Address Ranges Between Patterns

MediumSed & Awk5-10 min
The brief

A file has a block fenced by 'START' and 'END' markers, and the whole block needs to go — markers included.

Delete every line from START to END inclusive in /root/work/doc.txt, saving the rest to /root/work/out.txt.

Lines outside the block must come through untouched.

What you'll do
  • Delete the whole span from START to END, markers included
  • Save the untouched remainder 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.