Archive for the ‘grep’ Category

Filter the messages file

Thursday, March 19th, 2015

I had an issue which the vendor support needed messages from the messages log file.

There of course are messages which are frequent and could hide the needed debug messages.

I just needed to filter them out.

cat messages | grep -v "message not wanted" | grep "message repeated" > textfile

Smaller and more succinct detail for the vendor support people.

Legibility could be an issue for some so if you want to be nice; run the file through a conversion:

unix2dos <file> <outputfile>