I need to read a text file and make it fit X amount of columns.
For example, if my text.txt contains:
ABCDEFGHIJK
the resulting file for a width of 4 should be:
ABCD
EFGH
IJK
Like this?
$ echo ABCDEFGHIJK | sed -r 's/(....)/\1\n/g'
ABCD
EFGH
IJK