Merge 2 lines into one

Posted by shantanuo on Stack Overflow See other posts from Stack Overflow or by shantanuo
Published on 2012-06-25T02:56:01Z Indexed on 2012/06/25 3:16 UTC
Read the original article Hit count: 119

Filed under:
|
|

I have a text file starts with 9 digits college code and ends with of 5 digits course code.

512161000 EN5121 K. K. Jorge Institute of Engineering Education and Research, Nashik 61220 Mechanical Engineering [Second Shift] XOPENH 1 116 16978
517261123 EN5172 R. C. Rustom Institute of Technology, Shirpur 61220 Mechanical Engineering [Second Shift] YOPENH 1 100 29555
617561234 EN6175 abc xyz Education Trust, abc xyz College of Engineering,
Pune 61220 Mechanical Engineering [Second Shift] ZOPENH 2 105 25017

There are some entries where there is a line break as shown in the 3 example above. I need to merge 3rd and 4th line into one just like 1st and 2nd line, so that I can easily use command like grep, awk etc.

© Stack Overflow or respective owner

Related posts about sed

Related posts about awk