How to merge two csv files with one column using linux commands

I was wondering how to combine two csv files with one column into one file, where the resulting file will contain two columns.

file1.csv
    first_name
    chris
    ben
    canister

file2.csv
    last_name
    smith
    white
    perry

Result.csv
    first_name, last_name
    Chris,
    Ben Smith , white
    canister, pear

thank

+3
source share
2 answers
[ghoti@pc ~]$ cat file1
John
Mary
[ghoti@pc ~]$ cat file2
Smith
Jones
[ghoti@pc ~]$ paste -d, file1 file2
John,Smith
Mary,Jones
[ghoti@pc ~]$ 
+12
source

You are looking for paste.

+7
source

All Articles