I'm trying to find a way to use printf to append a column to two rows of a file at the same time. I currently have an awk script that appends one column to a single row. Like this:
Code:
printf " " sum+1 >> "/tmp/awktest.txt"
I want to build two rows at the same time while appending this data to an existing file. This is an example of how the file would grow with each passing addition of data to the file.
Code:
01:13:34 02:13:34
10 15
Code:
01:13:34 02:13:34 03:13:34
10 15 12
Code:
01:13:34 02:13:34 03:13:34 04:13:34
10 15 12 20
Code:
01:13:34 02:13:34 03:13:34 04:13:34 05:13:34
10 15 12 20 8
The formatting between the integer values does not have to be exactly as above. In the above example I just lined up the columns for easier reading. The example below is OK as well.
Code:
01:13:34 02:13:34 03:13:34 04:13:34 05:13:34
10 15 12 20 8
It seems like I should be able to use some combination of LF, CR, FF to do this but I have not been able to find the right combination. Is it possible to do what I'm asking?