From the data you have shown, I have no idea what you are trying to do.
And, please use CODE tags when showing sample input, output, and code segments.
What operating system and shell are you using?
Is the idea that you take the second record from each set of input records with the same hour and minute, throw away the other records for that hour and minute, and replace everything from the 3rd colon through the 1st octothorp on the line you keep with Newnamen with increasing values of n for each hour and minute in your log?
Hi, I m sorry i didn't read the form rules and actually i still don't know a lot of things about unix. What i've to do is to format this logs to load it in a DB. The result has to be with timestamp to the minutes (so as it is from the log,just i m not interested in milliseconds) . After that I need to change the name EMTxx in other names, i 've 5 EMT from 0 to 4 and i want just change it to make it clear what the emitter is for that line! Thank you so much ...and forgive my english, i know is not the best one!
---------- Post updated at 11:20 AM ---------- Previous update was at 10:50 AM ----------
Thanks RUDIC it works,i think it has been really easy for you, i want learn...so i ve' to study. Just a little things the new name has not to increase but just change the emt01 with newname01 and so on til the number 05. I'll try to change the code you posted. Hope to do it in the right way
If you put a thread title like "Who can help me?" then nobody will help you because nobody has a clue what your question is about!!!! The thread title should give the whole community some clue as to what you want help with.