discarding-records.rex

Pipelines v2.1

 

.....|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+....10...

Home

     **** Top of file ****
   1
   2 /* The following pipeline reads the file: winston.txt, discarding every other record and
   3    display’s the retained records on the console. */
   4
   5 Address Rxpipe
   6
   7 'pipe < &installdrive:\&installpath\examples\input\winston.txt',
   8      '| specs recno 1 1-* nw',                /* Insert the record number. */
   9      '| join /@/',                            /* Join every two records. */
  10      '| specs ws /@/ w1 1',                   /* Select up to the /@/ character. */
  11      '| console'                              /* Display on the console. */
  12
  13 Say 'Hit Enter to close..'
  14 Parse Pull
  15
  16 Exit 0
     **** End of file ***
 

Console output

 
.....|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+....10...
   1          1
   2          3
   3          5 Winston Smith, his chin nuzzled into his breast in an effort to escape the vile
   4          7 quickly enough to prevent a swirl of gritty dust from entering along with him.
   5          9 The hallway smelt of boiled cabbage and old rag mats. At one end of it a
   6         11 depicted simply an enormous face, more than a metre wide: the face of a man
   7         13 Winston made for the stairs.
   8         15 It was no use trying the lift. Even at the best of times it was seldom working,
   9         17 part of the economy drive in preparation for Hate Week. The flat was seven
  10         19 right ankle, went slowly, resting several times on the way. On each landing,
  11         21 It was one of those pictures which are so contrived that the eyes follow you
  12         23
  13         25
  14         27
  15 Hit Enter to close..