Created
September 13, 2014 19:00
-
-
Save innermond/b101a9f61a4f7acc3bcd to your computer and use it in GitHub Desktop.
A piece of sed code that rejoin words splitted by hyphens
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/\-$/,/[^\-]$/{ | |
:a | |
N | |
/\-$/ ba | |
s/\-\n+//g | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a sample text with hyphens
Janet Kendle had collapsed in hysterics and had
been given a knock-out pill. But her husband Sid
was still mooning about the place, getting in every-
one's way. The man seemed unable to control him-
self sufficiently to take to his own bed for an hour
or so.