I am using Solaris SunOS 5.10. I have a directory which I have populated with a number of text files. Something like this:
CMGW9.log
CMGW11.log
CMGW2.log
.
.
CMGWx.log
I am filtering only the interesting part from a file by using:
cat CMGW9.log | nawk '/productNumber|productRevision/'
The output I get is:
productNumber GMPV4_CNP_R6.3.2.0D
productRevision R6A
Now the requirement is a csv file like following:
|MGW_Name| Product Number |Product Revision|
------------------------------------------------
CMGW9 GMPV4_CNP_R6.3.2.0D| R6A
CMGW11 xxxxxxxxxxxxxxxxxxx R6A
CMGW2 xxxxxxxxxxxxxxxxxxx R6A
. . . . . . . . .
CMGWx xxxxxxxxxxxxxxxxxxx xx
Please help. Thanks.