I have a long file with short lines (one word) f
that I would like to inspect.
It would fit on the screen if it wasn't for the newlines.
If the data was already arranged in columns I could just do column -t
but I want my one column to be split into many.
Knowing the length of the file I could just do:
$ sed -n '1,10p' f > f1
$ sed -n '11,20p' f > f2
$ sed -n '21,30p' f > f3
$ sed -n '31,40p' f > f4
$ sed -n '41,50p' f > f5
$ paste f[1-5]
I imagine one could also make a new directory, apply touch
on every line, do ls
, delete the directory.
But is there an easy way to do this without creating any files?
column -t
in the past to prettyprint files that were already organized into columns and triedcolumn
without parameters more to see what happens than because I expected it to work. – user2740 Apr 11 '19 at 13:45