0

I would like to split text into sentences. Sentence ends with a dot and followed by whitespace character.

  • not my area of knowledge, but maybe this might be helpful: http://stackoverflow.com/questions/918886/how-do-i-split-a-string-on-a-delimiter-in-bash – Devarsh Desai Aug 04 '14 at 05:51
  • OT: Some might say that that definition of a sentence isn't very universal! E.g. Mr. Doe, right? – Biffen Aug 04 '14 at 08:59

2 Answers2

1

Using tr/sed:

tr '\n' ' ' <  input | sed -e 's/[.] \s*/. \n/g'
perreal
  • 90,214
  • 20
  • 145
  • 172
1

This will print each separate sentence on a new line.

awk  'BEGIN{RS="\\. "}1' file