我怎样才能像这样把两个文件放在一起
file1.txt
:
ROW 1 3 5 654 56 5 56 65 6 54 4 3345 35 53 3 32 2 1
ROW2 6 65 456 67 687 78 89 657 435 34 534 5 435 5 2
file4.txt
:
01010100000000000000000000000000000101010001010
1111111111111111111100100101000101001000000000
01000000000000000000000000000000000000000000000
到:
ROW 1 3 5 654 56 5 56 65 6 54 4 3345 35 53 3 32 2 1
ROW2 6 65 456 67 687 78 89 657 435 34 534 5 435 5 2
01010100000000000000000000000000000101010001010
1111111111111111111100100101000101001000000000
01000000000000000000000000000000000000000000000
答案1
使用cat
:
cat file1.txt file4.txt
答案2
使用猫:
cat file1.txt file4.txt > output.txt
输出:
$ cat output.txt
ROW 1 3 5 654 56 5 56 65 6 54 4 3345 35 53 3 32 2 1
ROW2 6 65 456 67 687 78 89 657 435 34 534 5 435 5 2
01010100000000000000000000000000000101010001010
1111111111111111111100100101000101001000000000
01000000000000000000000000000000000000000000000
如果您不想轻易创建新文件:
cat file1.txt >> file4.txt
输出:
$ cat file4.txt
ROW 1 3 5 654 56 5 56 65 6 54 4 3345 35 53 3 32 2 1
ROW2 6 65 456 67 687 78 89 657 435 34 534 5 435 5 2
01010100000000000000000000000000000101010001010
1111111111111111111100100101000101001000000000
01000000000000000000000000000000000000000000000