sed (stream editor) with structural expressions