I was wondering how to merge two single column csv files into one file where the resulting file will contain two columns.
file1.csv
first_name
chris
ben
jerry
file2.csv
last_name
smith
white
perry
result.csv
first_name,last_name
chris,smith
ben,white
jerry,perry
Thanks
$ cat file1
John
Mary
$ cat file2
Smith
Jones
$ paste -d, file1 file2
John,Smith
Mary,Jones
The -d,
argument is used to designate commas as the delimiter between columns
You're looking for paste
.
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