I have a file that contains some data, for example
2011-01-02 100100 1 2011-01-02 100200 0 2011-01-02 100199 3 2011-01-02 100235 4
and have some "dictionary" in a separate file
100100 Event1 100200 Event2 100199 Event3 100235 Event4
and i know that
0 - warning 1 - error 2 - critical etc...
I need a little script with sed / awk / grep or something else that helps me get data like this
100100 Event1 Error 100200 Event2 Warning 100199 Event3 Critical etc
I will be grateful for ideas on how to do this in the best way, or for a working example
Update
sometimes I have such data
2011-01-02 100100 1 2011-01-02 sometext 100200 0 2011-01-02 100199 3 2011-01-02 sometext 100235 4
where sometext = any 6 characters (maybe this is useful information) In this case, I need integer data:
2011-01-02 sometext EventNameFromDictionary Error
or without "sometext"
source share