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

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -