g/baz/p\
s/doesn't match any line/replaced/
.=
w
