github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/builtins/core/ranges/ranges_doc.yaml (about) 1 - DocumentID: range 2 Title: >- 3 `[ ..Range ]` 4 CategoryID: parser 5 Summary: >- 6 Outputs a ranged subset of data from STDIN 7 Description: |- 8 This will read from STDIN and output a subset of data in a defined range. 9 10 The range can be defined as a number of different range types - such as the 11 content of the array or it's index / row number. You can also omit either 12 the start or the end of the search criteria to cover all items before or 13 after the remaining search criteria. 14 15 **Please note that `@[` syntax has been deprecated in favour of `[` syntax 16 instead** 17 Usage: |- 18 ``` 19 <stdin> -> [start..end]flags -> <stdout> 20 ``` 21 Examples: |- 22 **Range over all months after March:** 23 24 ``` 25 » a [January..December] -> [March..]se 26 April 27 May 28 June 29 July 30 August 31 September 32 October 33 November 34 December 35 ``` 36 37 **Range from the 6th to the 10th month:** 38 39 By default, ranges start from one, `1` 40 41 ``` 42 » a [January..December] -> [5..9] 43 May 44 June 45 July 46 August 47 September 48 ``` 49 50 **Return the first 3 months:** 51 52 This usage is similar to `head -n3` 53 54 ``` 55 » a [January..December] -> [..3] 56 October 57 November 58 December 59 ``` 60 61 **Return the last 3 months:** 62 63 This usage is similar to `tail -n3` 64 65 ``` 66 » a [January..December] -> [-3..] 67 October 68 November 69 December 70 ``` 71 Flags: 72 n: numeric offset (indexed from 0) 73 s: exact string match 74 r: regexp match 75 e: exclude the start and end search criteria from the range 76 b: removes blank (empty) lines from source 77 t: trims whitespace from source 78 8: handles backspace characters (char 8) instead of treating it like a printable character 79 Detail: |- 80 Synonyms: 81 - "@[" 82 Related: 83 - prepend 84 - append 85 - item-index 86 - element 87 - a 88 - ja 89 - jsplit 90 - count 91 - alter