truncating-records.rex

Pipelines v2.1

 

 

Same here. Now that we have cut down the file to a more reasonable size, we need to change this example.

Flann.txt now only comprises 15 lines.

 

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

Home

     **** Top of file ****
   1
   2 /* The following pipeline reads the file: flann.txt and truncates each record
   3    after column 50. */
   4
   5 Address Rxpipe
   6
   7 'pipe < &installdrive:\&installpath\examples\input\flann.txt',
   8      '| take 20',                   /* Select only the first 20 records. */
   9      '| chop 50',                   /* Truncate at column 50. */
  10      '| cons'                       /* Display on the console. */
  11
  12 Say 'Hit Enter to close..'
  13 Parse Pull
  14
  15 Exit 0
     **** End of file ****
 

Console output

 
.....|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+....10...
   1 THE LONG and unprecedented conversation I had with
   2 went in to him on my mission with the cigarette br
   3 of the more delicate speculations of de Selby, not
   4 of time and eternity by a system of mirrors. His t
   5 as follows;
   6
   7 If a man stands before a mirror and sees in it his
   8 true reproduction of himself but a picture of hims
   9 de Selby's explanation of this phenomenon is quite
  10 truly enough, has an ascertained and finite rate o
  11 of any object in a mirror can be said to be accomp
  12 light should first strike the object and subsequen
  13 thrown back again to the object ù to the eyes of a
  14 therefore an appreciable and calculable interval o
  15 of a glance at his own face in a mirror and the re
  16 his eye.
  17
  18 So far, one may say, so good. Whether this idea is
  19 involved is so negligible that few reasonable peop
  20 ever loath to leave well enough alone, insists on
  21 Hit Enter to close..