If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
can anyone please suggest how to do this? i believe perl or awk may
have easy solution.
what i am trying to achieve is to search for error code, if found then write Joining previous line and current line
here is input file layout
Record 1:xxxxxxxx
Error A:YYYYYYYY
Record 2:xxxxxxxx
Error A:YYYYYYYY
Record 3:xxxxxxxx
Error B:YYYYYYYY
Record 4:xxxxxxxx
Error A:YYYYYYYY
Record 5:xxxxxxxx
Error C:YYYYYYYY
=============================
desired output
Record 1:xxxxxxxx::Error A:YYYYYYYY
Record 2:xxxxxxxx::Error A:YYYYYYYY
Record 3:xxxxxxxx::Error B:YYYYYYYY
Record 4:xxxxxxxx::Error A:YYYYYYYY
Record 5:xxxxxxxx::Error C:YYYYYYYY