Hi All,
I get the test result file daily after running the main test script. from the resultfile, need to fetch only server info and status and put them in tabular format in a file and as well in CSV format output file.
I tried using awk command but am not able to put them in tabluar format as well in csv foramt output file.
basically, single script should produce both output file.
awk '{ print $1 $5 }' testreport.txt
my input file look like this :
testreport.txt
Starting collect reports
CollectReport
Not receive test report from ServerAA
Not receive test report from ServerF
Not receive test report from ServerG
Not receive test report from ServerJ
Not receive test report from ServerK
Testing Date : 04/09/13 12:26:22
Checking Result - Software Checks
ServerA: Software checks is passed. (Latest version : DT 2.1 for DT/AT to support XGen: DT 2.1)
ServerB: Software checks is passed. (Latest version : Synx : CONFIG_Sol-2013-SI-C_upgrade_01 package upgrade for SSI)
ServerC: Software checks is passed. (Latest version : DT 2.1 for DT/AT to support XGen: DT 2.1)
ServerD: Software checks is passed. (Latest version : Synx : CONFIG_Sol-2012-SI-B_upgrade_02 package upgrade for SSI)
ServerE: Software checks is failed. (Latest version : EET : CONFIG_Sol-2011-SI-C_upgrade_01 package upgrade for EET)
ServerH: Software checks is passed. (Latest version : ASI : CONFIG_Sol-2012-SI-C_upgrade_01 package upgrade for ASI)
Tabular format output should look like :
|============================================|
| Report Status |
|============================================|
| Server Software Checks |
|============================================|
| ServerA passed |
| ServerB passed |
| ServerC passed |
| ServerD passed |
| ServerE failed |
| ServerH passed |
|============================================|
csv format output file :
Server,Software Checks
ServerA,passed
ServerB,passed
ServerC,passed
ServerD,passed
ServerE,passed
ServerH,passed