I have a scenario where I want to redirect all the output of a text file into a single cell of excel.
text file data:
"remove dead code"
"keep cassandra and postgres in OR condition"
"InsertFailCDRList"
"to be updated in error handling US, write TODO here in comments"
I want this data in my one column. For eg.
C1 C2
1 TEXT FILE OUTPUT HERE
2 OTHER TEXT FILE OUTPUT HERE
But problem is text is not coming single cell but it spreads to multiple cells.
Using commands:
#!/bin/bash -x
output=$(cat commentmessage.txt)
number=1
echo $number,"${output}" > buc_review_comments_data3.csv
Output is like:
C1 C2
1 "remove dead code"
"keep cassandra and postgres in OR coniditon"
"InsterFailCDRList"
I want all under row 1 column 2. How can we do this using bash? Please help.
Desired Output:
C1 C2
1 "remove dead code"
"keep cassandra and postgres in OR coniditon"
"InsterFailCDRList"
2 "new data here"
"new data"
So Basically, I have ID=BUC123
totalcomments=4
Text file - containing multiple comments.
Want these in above format in excel.