Friday, September 29, 2006

Power of three..me, my comp and unix

Solution to anything might happen to be easy,
but reaching there always takes agood amount of pain and that's why its FUN

This is for the below command i wrote to solve my problem:
Requirement,
After all parsing I had a list of files each having an error message like 'message=blah blah'.
So how to extract this string from each line which starts with 'message='

WIth lots of google search and thanks to Thiyaga:) to help me know the power of 'sed'

I'll try to know this tool more..

Till then this was the commande generated,

cut -d' ' -f10- ~/Errors.0907 | sed 's/.*message=\(.*\)/\1/' | cut -d'&' -f1 | sort | uniq -c | sort -nr > ~/fileredErros.0907

..

No comments: