How to column-ify an output from a certain program?
Posted
by
mbaitoff
on Stack Overflow
See other posts from Stack Overflow
or by mbaitoff
Published on 2011-01-14T13:13:31Z
Indexed on
2011/01/14
14:53 UTC
Read the original article
Hit count: 221
I have a program that generates and outputs a sequence of simple sample math homework tasks, like:
1 + 1 = ...
3 + 3 = ...
2 + 5 = ...
3 + 7 = ...
4 + 2 = ...
a sequence can be quite long, and I'd like to save space when this sequence is printed by converting it as follows:
1 + 1 = ... 3 + 7 = ...
3 + 3 = ... 4 + 2 = ...
2 + 5 = ...
that is, wrapping the lines into the two or more columns. I was expecting the column
linux utility to do the job using the -c N
option witn N=2
, however, it still outputs the lines in one column whatever the N
is.
How would I do the column-ifying of the sequence of lines?
© Stack Overflow or respective owner