问题
I am trying to combine two text files each with a single column into a third text file that has both of the columns separated by a space.
One text file looks something like the following (shortened for the purpose of this explanation):
-53.46
-50.45
-47.44
The second text file looks something like this (also shortened for this explanation):
1.71
3.42
5.13
and I want to combine them to get a file:
-53.46 1.71
-50.45 3.42
-47.44 5.13
Currently I am trying the method:
paste -d " " file1 file2 > file3
but then when I view the file with the less command the columns are separated by
^M
And if I view them in gedit or similar they are each on a different line with a space at the start of each line.
Please send help.
来源:https://stackoverflow.com/questions/51150503/bash-paste-d-command-outputting-a-return-separated-file