1
2
3
  
cat out | python -c "import sys; print sys.stdin.read().replace('.\n','.')"
  
<a href="http://slash4.net/blog/python/sed-replace-newline-or-python-awk-tr-perl-xargs.html">sed replace newline (or 5 ways to remove line breaks with sed, python, tr, perl, xargs)</a>