Purpose, Argument, Streams, Usage, Examples, Related
┌─STRing──┐ ┌─STRing──┐ >>──BETWEEN──┬────────────┬──┼─────────┼──fromstring──┼─────────┼──┬─tostring─┬──────>< ├─CASEI(...)─┤ ├─REGexp──┤ ├─REGexp──┤ └─numrecs──┘ └─ZONE(...)──┘ ├─PATtern─┤ ├─PATtern─┤ └─ANYof───┘ └─ANYof───┘
Use the BETWEEN stage to select groups of records from its primary input stream, starting
with the first record that begins with the specified string
fromstring. BETWEEN writes a group of records to its primary output stream, ending a
group with the record that has the second specified string
tostring, or with all remaining records once the specified number of records numrecs is reached.
Unless the CASEI or ZONE pre-process keyword specifies a different column range, both fromstring and tostring must
begin in the first column of an input record. If the secondary output stream is connected; BETWEEN
writes the records not selected to its secondary output stream. If the secondary output stream is
not connected, BETWEEN discards these records.
between /b/ /7/
between 1b1 171
'pipe < abc.txt' | between /aaa/ /ccc/ | console'
'pipe < abc.txt' | between /aaa/ 4 | console'
CASEI, INSIDE, FROMLABEL, OUTSIDE, TOLABEL