I have n files containing one line and want to concatenate them:
Input files:
file_1
A B C
file_2
1 2 3
Desired console ouput result:
A B C
1 2 3
But with:
$ cat file_1 file_2
I get:
A B C1 2 3
Try
echo | cat file_1 - file_2
Alternatively, terminate the last line of file_1 with a new-line symbol.
Yet another way:
$ echo > n
$ cat file_1 n file_2 n file_1 n file_2 n
A B C
1 2 3
A B C
1 2 3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With