# Pastebin 11pZO18x $ echo raw > raw; printf 'before\nREPLACE:garbage,\nafter\n' | sed -e '/REPLACE/ {' -e 'r raw' -e 'd' -e '}' before raw after