regex - convert a single column into tabular format -


i have file contains entries in single column like:

0 syscatspace 16384 13432 2948 1 1 tempspace1 1 1 applicable 1 2 userspace1 4096 1888 2176 1 

but want convert in tabular form of 3*6 :

0 syscatspace 16384 13432 2948       1 1 tempspace1  1     1     applicable 1 2 userspace1  4096  1888  2176       1 

can me..

using sed:

sed -n 'n;n;n;n;n;s/\n/ /gp' input 

which reads 6 lines, replaces newlines spaces , prints out single line. , if want align columns can column:

sed -n 'n;n;n;n;n;s/\n/ /gp' input | column -t 

Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -