sed '/^$/{N;/^\n$/D}' urfile
D Delete up to the first embedded newline in the pattern space. Start next cycle, but skip reading from the input
if there is still data in the pattern space.
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |