Joining records

Pipelines v1.6

 

.* Example by TenFiftyTwo(c).

Home

 
.* The following pipeline reads the file: example.txt; trims trailing whitespace, splits each record
.* at a word boundary and then joins each consecutive set of six records together with an
.* interleaving plus sign '+'.
 
pipe < &installdrive:\&installpath\Examples\Input\example.txt .* Read input file.
     | strip trailing                                         .* Trim off whitespace.
     | split                                                  .* Split at word boundaries.
     | join 5 /+/                                             .* Join every six records together.
     | cons                                                   .* Display on the console.