I\'ve used a grep command with sed and cut filters that basically turns my output to something similar to this
this line 1 this line 2 another li
This can be done with the tr command as well. Like so
tr
| tr -s [:space:]
or alternatively
| tr -s \\n
if you want to remove the line breaks only, without the space chars in the beginning of each line.