小编cat*_*cha的帖子

bash将列剪切为一个文件并保存到另一个文件的末尾

我想从一个文件中剪切两列,并将它们粘贴在第二个文件的末尾.这两个文件具有完全相同的行数

file1.txt
1  2  3  4  5  6  7  8  9  10  
1  2  3  4  5  6  7  8  9  10
1  2  3  4  5  6  7  8  9  10

file2.txt
a  b  c  d  e  f  g  h i  j
a  b  c  d  e  f  g  h i  j
a  b  c  d  e  f  g  h i  j
a  b  c  d  e  f  g  h i  j
Run Code Online (Sandbox Code Playgroud)

到目前为止我一直在使用

cut -f9-10 file2.txt  | paste file1.txt …
Run Code Online (Sandbox Code Playgroud)

linux bash cut paste

6
推荐指数
1
解决办法
3425
查看次数

标签 统计

bash ×1

cut ×1

linux ×1

paste ×1