fold
can wrap the line if it has more than a certain amount of characters. However, I want to wrap a text file which has less than 40 characters in each line into two columns (80 chars per line total).
I want to make
apple
banana
(28 items omitted)
grape
guava
into
apple ...
banana ...
(12 items omitted) (12 items omitted)
... grape
... guava
How can I make it?
Best Answer
Using the
-COLUMN
or--columns=COLUMN
option ofpr
so either
or
For example, augmenting your entries with some random dictionary words,