I have a bunch of text files in the following format:
Lorem ipsum dolor sit amet,
consetetur sadipscing elitr,
sed diam nonumy eirmod tempor
invidunt ut labore et dolore
magna aliquyam erat, sed diam
voluptua. - At vero eos et accu-
sam et justo duo dolores et ea
rebum. - Stet clita kasd guber-
gren, no sea takimata sanctus
est Lorem ipsum dolor sit amet.
How can I print this as continuous text on the command line, but with removing the syllable division on the line ends:
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. - At vero eos et accusam et justo duo dolores et ea rebum. - Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
I could use tr '\n' ' ' to convert the new-lines into spaces
The problem is tr can only replace one character and I would need some command to remove the -\n in advance. How can I achieve this on the bash comman-line?
\nthe-envelope calculation”). There may be no practical way to programmatically distinguish those cases from the others.