Advertisement
hakonhagland

Full code

Jan 11th, 2014
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. awk '{gsub(/\n\n+/,"\n\n");printf $0}' RS="^$" file | sed '
  2. s/\s*\([.,;!?]\)\s*/\1 /g
  3. s/\s\+/ /g
  4. s/^.*$/\L&/
  5. s/\([.;!?]\s*\)\(.\)/\1\u\2/g
  6. s/^./\u&/
  7. /\(^$\)\|\([!?;.,]\s*$\)/! s/\s*$/.&/
  8. '
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement