|
Inserting blank records |
Pipelines v1.6 |
.* Example by TenFiftyTwo(c). |
.* The following pipeline reads the input file: example.txt and inserts a blank record in between.* records which contain data. The output is displayed on the console. pipe (endchar ? stagesep ~ comment //)
< &installdrive:\&installpath\Examples\Input\example.txt // Read input file. ~ strip trailing // Trim off whitespace. ~ a: locate // Ignore null records. ~ specs 1-* 1 x0a n // Append an NL character. ~ b: faninany // Read from all streams. ~ cons // Display on the console. ? a: ~ take * // Accept the records. ~ b: // Route back to main pipeline.