cmd:paste 

*Tags*: cmd:tmpf, cmd:jot

$ jot -w sortt%d 5 12 - -1 | paste -d-  - `tmpf jot -c 5 A`
sortt12-A
sortt11-B
sortt10-C
sortt9-D
sortt8-E

paste -sd 

Date: 12/18/04
> $ seq 10 | paste -sd "   \n"
> 1 2 3 4
> 5 6 7 8
> 9 10
>
> >From the man page:
>
> -d, --delimiters=LIST
> reuse characters from LIST instead of TABs
>
> But I don't understand why more space in delimiter list would produce
> different results. Please explain.

Maybe these examples will make it clear:

$ seq 10 | paste -sd "ABC"
1A2B3C4A5B6C7A8B9C10
$ seq 10 | paste -sd "ABC\n"
1A2B3C4
5A6B7C8
9A10

`paste' always uses ONE character as delimiter. When you specify more than one character `paste' will cycle through them. In your last example, it uses a space as the delimiter for the first three columns and a newline for the fourth.

Maurits van Rees