Reputation: 73
I am parsing few logs where I extract a single column from each log. I need to keep on appending them to a csv file.
Please let me know how to achieve this. Thanks in advance.
Upvotes: 1
Views: 810
Reputation: 5300
Given
$ cat foo.txt
foo0
foo1
foo2
$ cat bar.txt
bar0
bar1
bar2
$ cat qux.txt
qux0
qux1
qux2
You can use paste
and -d
elimit with ,
:
$ paste -d, foo.txt bar.txt qux.txt
foo0,bar0,qux0
foo1,bar1,qux1
foo2,bar2,qux2
$
Upvotes: 2