========== diff -U1 usr.bin/column/column.c.orig usr.bin/column/column.c ========== --- usr.bin/column/column.c.orig 2011-07-08 01:29:43.000000000 -0700 +++ usr.bin/column/column.c 2011-07-08 01:43:53.000000000 -0700 @@ -75,2 +75,4 @@ +int between = 2; /* default blanks between columns */ + int entries; /* number of records */ @@ -101,3 +103,3 @@ tflag = xflag = 0; - while ((ch = getopt(argc, argv, "c:s:txn")) != -1) + while ((ch = getopt(argc, argv, "b:c:s:txn")) != -1) switch(ch) { @@ -109,2 +111,7 @@ break; + case 'b': + between = atoi(optarg); + if (between < 1) + errx(1, "`between' must be greater than 0"); + break; case 's': @@ -307,3 +314,3 @@ (void)wprintf(L"%ls%*ls", t->list[coloff] ? t->list[coloff] : L"", - lens[coloff] - t->len[coloff] + 2, L" "); + lens[coloff] - t->len[coloff] + between, L" "); (void)wprintf(L"%ls\n", t->list[coloff] ? t->list[coloff] : L""); @@ -370,3 +377,3 @@ (void)fprintf(stderr, - "usage: column [-tx] [-c columns] [-s sep] [file ...]\n"); + "usage: column [-tx] [-b between] [-c columns] [-s sep] [file ...]\n"); exit(1); ========== diff -U1 usr.bin/column/column.1.orig usr.bin/column/column.1 ========== --- usr.bin/column/column.1.orig 2011-07-08 01:29:43.000000000 -0700 +++ usr.bin/column/column.1 2011-07-08 02:10:43.000000000 -0700 @@ -43,2 +43,3 @@ .Op Fl ntx +.Op Fl b Ar between .Op Fl c Ar columns @@ -58,2 +59,8 @@ .Bl -tag -width indent +.It Fl b +Columns in +.Fl t +output are separated by +.Ar between +space characters (default 2). .It Fl c