Tool
In Novell Log Manager, a user can export search results as a CSV file. Usually the generated CSV has more than 300+ columns corresponding to the 300+ event fields in a Sentinel schema of which more than 200+ columns may be empty.
So you may have data in the 1st column and data in 300th column but you need to scroll across all those empty columns in between to even see the data. Moreover Open Office, Excel, Google Docs most often throw up an error while trying to open a CSV file with so many columns.
To solve this problem, I have written a simple perl script that removes all the empty columns from the specified input file and writes it to the specified output file. After which the resultant output file can be looked at and edited easily in any of the editors.
To run this script, simply open up a terminal in Linux and type -
perl deleteEmptyColumnsFromCSV.pl Input_CSV_Filename Output_Filename
Substitute Input_CSV_Filename with the name of the CSV file from which you want empty columns to be removed and Output_Filename with name of the file to which the output needs to be written.
| Attachment | Grootte |
|---|---|
| deleteEmptyColumnsFromCSV.pl.txt | 3.22 KB |
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.
Related Articles
User Comments
- Be the first to comment! To leave a comment you need to Login or Register
- 5376 reads


0