Unfold vCard lines in shell

Posted by l0b0 on Stack Overflow See other posts from Stack Overflow or by l0b0
Published on 2010-03-18T10:47:25Z Indexed on 2010/03/18 10:51 UTC
Read the original article Hit count: 387

Filed under:
|

vCard lines can be folded by inserting "\r\n " (that's a space at the start of the new line), but I'm struggling to unfold them with the line-oriented GNU tools (sed, cut). Any ideas? Effectively, from the string

foo
 bar
baz
ban
 bay
 bal

it must return

foobar
baz
banbaybal

© Stack Overflow or respective owner

Related posts about shell

Related posts about text