Quantcast
Viewing all articles
Browse latest Browse all 1179

Re: Need to create the report using the script

Perhaps something like:

awk -v server=ServerA '

BEGIN {

   serial = "---"

   license_key = "---"

   platform = "---"

   version = "---"

}

/Product Name/ {

   product = $4

   for (i = 5; I < NF; ++i) product = product " " $i

   next

}

/License Key/ {

   license_key = $4

   next

}

/Serial Number/ {

   serial = $4

   next

}

/License Type/ {

   license_type = $4

   next

}

/Platform =/ {

   platform = $3
}

/Version =/ {

   version = $3

   next

}

/----/ && product != "" {

   print server, product, serial, license_key, license_type, platform, version

   serial = "---"

   license_key = "---"

   platform = "---"

   version = "---"

   next

}

END {

   print server, product, serial, license_key, license_type, platform, version

}' input-file


Viewing all articles
Browse latest Browse all 1179

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>