Answer the question
In order to leave comments, you need to log in
How to jump to a specific line in a file in Bash?
There is a log. It is necessary to go through the entire log and compare the value from the log piece with the value that was a second earlier.
With the help of awk and sed it was not possible to write (I could not reconcile with the loop and setting variables).
Help me please
Answer the question
In order to leave comments, you need to log in
The question is too vague.
I can assume that it is necessary to find lines in the log where the parameter we need has changed relative to the previous one, for example:
Л="дело1 было утром
дело2 было утром
дело3 было днём
дело4 было днём
дело5 было днём
дело6 было вечером
дело7 было вечером
дело8 было ночью"
дело1 было утром
дело3 было днём
дело6 было вечером
дело8 было ночью
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question