我想知道如何将两个单列csv文件合并到一个文件中,其中生成的文件将包含两列.
file1.csv
first_name
chris
ben
jerry
file2.csv
last_name
史密斯
白
佩里
result.csv
first_name,last_name
chris,smith
ben,white
jerry,perry
谢谢
gho*_*oti 12
[ghoti@pc ~]$ cat file1
John
Mary
[ghoti@pc ~]$ cat file2
Smith
Jones
[ghoti@pc ~]$ paste -d, file1 file2
John,Smith
Mary,Jones
[ghoti@pc ~]$
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7543 次 |
| 最近记录: |