Arranging text in columns (horizontal)

Pipelines v1.6

 

.* Example by TenFiftyTwo(c).

Home

 
.* The following pipeline reads the file: example.txt; selects the first 8 words of
.* each record and aligns them in columns 12 characters wide.
 
pipe < &installdrive:\&installpath\Examples\Input\example.txt .* Read input file.
     | strip trailing         .* Trim off whitespace.
     | locate                 .* Discard null records.
     | specs w1-8 1 /@/ nw    .* Select words 1 through eight and append the '@'.
     | split                  .* Split into individual words.
     | specs 1-* 1.12         .* Make the record twelve bytes long.
     | join until 1 str /@/   .* Join records back together.
     | cons                   .* Display on the console.