I want to put the output data from unix command to a csv file. Suppose the output which I am getting is :
A
B
C
I want to put this data in .csv
For my understanding, @Django needs three line into one line.
paste -d ' ' - - - < infile
If you need output as csv format (split by ,
), you can use this
paste -d ',' - - - < infile
Here is the test result
$ cat infile
Manoj Mishra
Japan
Environment.
Michael Jackson
America
Environment.
$ paste -d ',' - - - < infile
Manoj Mishra,Japan,Environment.
Michael Jackson,America,Environment.