Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

parsing output for excel

Status
Not open for further replies.

dwcasey

MIS
Oct 31, 2002
179
0
0
US
I run a script that does some checks on many, many servers.

If an error condition exists, I write out to a file ERR: with the issue that was found. I'm wanting to be able to create some format from this that will go into a spreadsheet. Really just looking for ideas on what would be a good way to parse it that would be acceptable for Excel. Like maybe grab a unique servername and all it's issues?

This is a cat *.out of the servers.out file created by my script.

srv.srv01.out:ERR: dummy not found for LTAPEDEV in pri srv01
srv.srv01.out:ERR: Found 127.0.0.1 on TSM Server in resolv.conf for TSM srv01
srv.srv02.out:ERR: dummy not found for LTAPEDEV in pri srv02
srv.srv02.out:ERR: directory /dummy not found on filesystem in pri srv02
srv.srv02.out:ERR: directory /dummy not found on filesystem in bkp srv02
srv.srv02.out:ERR: Found 127.0.0.1 on TSM Server in resolv.conf for TSM srv02
srv.srv03.out:ERR: dummy not found for LTAPEDEV in pri srv03
srv.srv03.out:ERR: directory /dummy not found on filesystem in pri srv03
srv.srv03.out:ERR: directory /dummy not found on filesystem in bkp srv03
srv.srv03.out:ERR: Found 127.0.0.1 on TSM Server in resolv.conf for TSM srv03
 
Use Coma Separated Variable files

Delimit your fields with a comma.
Use the csv extension
Open with Excel



On the internet no one knows you're a dog

Columb Healy
 
I ended up sending all my ERR output to their own file for each server, then using some AWK ( with help from the internet ) going with servername, a TAB, error condition.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top