removing-blank-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 and removes any blank records. */
   3
   4 Address Rxpipe
   5
   6 'pipe < &installdrive:\&installpath\examples\input\winston.txt',
   7      '| strip trailing',                               /* Trim off whitespace. */
   8      '| locate',                                       /* Discard blank records. */
   9      '| console'                                       /* Display on the console. */
  10
  11 Say 'Hit Enter to close..'
  12 Parse Pull
  13
  14 Exit 0
     **** End of file ****
 

Console output

 
.....|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+....10...
   1 It was a bright cold day in April, and the clocks were striking thirteen.
   2 Winston Smith, his chin nuzzled into his breast in an effort to escape the vile
   3 wind, slipped quickly through the glass doors of Victory Mansions, though not
   4 quickly enough to prevent a swirl of gritty dust from entering along with him.
   5 The hallway smelt of boiled cabbage and old rag mats. At one end of it a
   6 coloured poster, too large for indoor display, has been tacked to the wall. It
   7 depicted simply an enormous face, more than a metre wide: the face of a man
   8 about forty-five, with a heavy black moustache and ruggedly handsome features.
   9 Winston made for the stairs.
  10 It was no use trying the lift. Even at the best of times it was seldom working,
  11 and at present the electric current was cut off during daylight hours. It was
  12 part of the economy drive in preparation for Hate Week. The flat was seven
  13 flights up, and Winston, who was thirty-nine and had a varicose ulcer above his
  14 right ankle, went slowly, resting several times on the way. On each landing,
  15 opposite the lift shaft, the poster with the enormous face gazed from the wall.
  16 It was one of those pictures which are so contrived that the eyes follow you
  17 about when you move.
  18 BIG BROTHER IS WATCHING YOU, the caption beneath it ran.
  19 Hit Enter to close..