Skip to main content
edited body
Source Link
jesse_b
  • 41.6k
  • 14
  • 109
  • 163

I have a unix file like below

abcdge
efg
bh

ggh
bhj
mkl

I want to change the file and make it like:

abcdge
efg
bhggh
bhj
mkl

means: after each blank fileline, the next line should be append with previous line. How can i achieve it?

I have a unix file like below

abcdge
efg
bh

ggh
bhj
mkl

I want to change the file and make it like:

abcdge
efg
bhggh
bhj
mkl

means: after each blank file, the next line should be append with previous line. How can i achieve it?

I have a unix file like below

abcdge
efg
bh

ggh
bhj
mkl

I want to change the file and make it like:

abcdge
efg
bhggh
bhj
mkl

means: after each blank line, the next line should be append with previous line. How can i achieve it?

edited tags
Link
jesse_b
  • 41.6k
  • 14
  • 109
  • 163
added 23 characters in body
Source Link
jesse_b
  • 41.6k
  • 14
  • 109
  • 163

I have a unix file like below

abcdge

efg

bh

==blank line==

ggh

bhj

mkl

abcdge
efg
bh

ggh
bhj
mkl

=============================

 

I want to change the file and make it like:

abcdge

efg

bhggh

bhj

mkl

abcdge
efg
bhggh
bhj
mkl

means: after each blank file, the next line should be append with previous line. How can i achieve it?

I have a unix file like below

abcdge

efg

bh

==blank line==

ggh

bhj

mkl

=============================

I want to change the file and make it like:

abcdge

efg

bhggh

bhj

mkl

means: after each blank file, the next line should be append with previous line. How can i achieve it?

I have a unix file like below

abcdge
efg
bh

ggh
bhj
mkl
 

I want to change the file and make it like:

abcdge
efg
bhggh
bhj
mkl

means: after each blank file, the next line should be append with previous line. How can i achieve it?

Source Link
Loading