Can use a single `sed`? E.g. `sed '/.../!d; s/...//g'`?