cat ABC.log | egrep "Error 500" >> /tmp/Logs.log
egrep "<Mango>.<.Mango>" Logs.log | sed -e "s/^.<Mango/<Mango/" | cut -f2 -d">"| cut -f1 -d"<" >> /tmp/temp1.xls
egrep "<Apple>.<.Apple>" Logs.log | sed -e "s/^.<Apple/<Apple/" | cut -f2 -d">"| cut -f1 -d"<" >> /tmp/temp2.xls
print Heading1, Heading 2 >> /tmp/output.xls
paste /tmp/temp1.xls /tmp/temp2.xls > /tmp/output.xls
Output:
Heading 1 Heading2
Mango1 Apple1
Mango2 Apple2
.
.
.
.
So on...
But when iam executing this query, The heading 1 and Heading 2 is like
"Heading1 Heading 2" in the first cell of the excel. I want them to be in different columns as column headers.
You help will be appreciated....