Eu tentei
paste -d ' ' file1 file2 file3 > file4
e funcionou bem. Testado no MacOS.
Estes são 3 arquivos:
file1 file2 file3
1 2 3 1 1 1 3 3 3
2 1 3 1 1 1 3 3 3
0 0 0 1 1 1 3 3 3
Quero juntar-me a eles e ter um arquivo final como:
1 2 3 1 1 1 3 3 3
2 1 3 1 1 1 3 3 3
0 0 0 1 1 1 3 3 3
Mas quando eu uso:
paste file1 file2 file3 > file4
Eu vejo uma lacuna na saída (file4):
1 2 3 1 1 1 3 3 3
2 1 3 1 1 1 3 3 3
0 0 0 1 1 1 3 3 3
O que devo fazer para não ver essas lacunas?
Experimente paste -d ' ' file1 file2 file3
. Do manual:
-d list Use one or more of the provided characters to replace the newline characters instead of the default tab. The characters in list are used circularly, i.e., when list is exhausted the first character from list is reused. This continues until a line from the last input file (in default operation) or the last line in each file (using the -s option) is displayed, at which time paste begins selecting characters from the beginning of list again. The following special characters can also be used in list: \n newline character \t tab character \ backslash character %bl0ck_qu0te% Empty string (not a null character). Any other character preceded by a backslash is equivalent to the character itself.
Tags paste