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
Post a Comment