I forgot to mention that GNU sed behaves differently on this case. I'm not sure if this is important. $ sed --version sed (GNU sed) 4.2.2 ... $ echo -e 'a\nb\nc\n' | sed -e 'c\' (no output) $ echo -e 'a\nb\nc\n' | sed -e 'c\ ' # add space after \ (4 blank lines) Andy 1457287964.0