linux - Joining a pair of lines with specific starting points -


i know sed can print

cat current.txt | sed 'n;s/\n/,/'  > new.txt b c d e f 

to

a,b c,d e,f 

what following:

a b c d e f 

to

a,d b,e c,f 

i'd join 1 4, 2 5, 3 6 , on. possible sed? idea how achieved?

thank you.

try printing in columns:

pr -s, -t -2 current.txt 

Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -