replace line return by space bash code example
Example 1: bash replace newline with space
Just use tr command as follow:
tr '\n' ' ' < file #Replaces all newlines matches with a space ' '
Example 2: tr new line
Just use tr command as follow:
tr , '\n' < file #Replaces all ',' matches for a new line