I have a file with the following entries
--INFO----- Command processing: Name='shayam' Age='19' Project='Alwa' --ERROR---- Failed to process --INFO----- Command processing: Name='ram' Age='23' Project='Alwa' --INFO----- Command processing: Name='raja' Age='24' Project='Alwa' --INFO----- Command processing: Name='shyla' Age='27' Project='Alwa' --ERROR---- Failed to process
I need to extract Name and Age from the corresponding line for which error occurred. In this case, I need to extract Name=shayam, Age=19 and Name=shyla Age=27.
I would stick to the same approch of the other answer to the similar question, simply storing the last INFO found so far