make lines out of long string

April 26, 2011 at 15:52:20
Specs: Soloris 10, Sun, 8gb
I have a long list of numbers separated with a single space in a single line (no newlines).

How do I change every 7th space to a newline, making lines of 7 numbers each?

Robert D.


See More: make lines out of long string

Report •

#1
April 27, 2011 at 08:49:45
a way ....

xargs -n 7 < datafile.txt


Report •

#2
April 27, 2011 at 10:25:06
That worked. Thanks!

RD


Report •
Related Solutions


Ask Question