github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/docs/commands/append.md (about)

     1  # `append`
     2  
     3  > Add data to the end of an array
     4  
     5  ## Description
     6  
     7  `append` data to the end of an array.
     8  
     9  ## Usage
    10  
    11  ```
    12  <stdin> -> append value -> <stdout>
    13  ```
    14  
    15  ## Examples
    16  
    17  ```
    18  » a [Monday..Sunday] -> append Funday
    19  Monday
    20  Tuesday
    21  Wednesday
    22  Thursday
    23  Friday
    24  Saturday
    25  Sunday
    26  Funday
    27  ```
    28  
    29  ## Detail
    30  
    31  `prepend` and `append` are data type aware:
    32  
    33  ```
    34  » tout json [1,2,3] -> append 4 5 6 bob
    35  Error in `append` (1,22): cannot convert 'bob' to a floating point number: strconv.ParseFloat: parsing "bob": invalid syntax
    36  ```
    37  
    38  ## Synonyms
    39  
    40  * `append`
    41  * `list.append`
    42  
    43  
    44  ## See Also
    45  
    46  * [`[ ..Range ]`](../parser/range.md):
    47    Outputs a ranged subset of data from STDIN
    48  * [`[ Index ]`](../parser/item-index.md):
    49    Outputs an element from an array, map or table
    50  * [`[ Index ]`](../parser/item-index.md):
    51    Outputs an element from an array, map or table
    52  * [`[[ Element ]]`](../parser/element.md):
    53    Outputs an element from a nested structure
    54  * [`a` (mkarray)](../commands/a.md):
    55    A sophisticated yet simple way to build an array or list
    56  * [`addheading` ](../commands/addheading.md):
    57    Adds headings to a table
    58  * [`cast`](../commands/cast.md):
    59    Alters the data type of the previous function without altering it's output
    60  * [`count`](../commands/count.md):
    61    Count items in a map, list or array
    62  * [`ja` (mkarray)](../commands/ja.md):
    63    A sophisticated yet simply way to build a JSON array
    64  * [`match`](../commands/match.md):
    65    Match an exact value in an array
    66  * [`msort`](../commands/msort.md):
    67    Sorts an array - data type agnostic
    68  * [`mtac`](../commands/mtac.md):
    69    Reverse the order of an array
    70  * [`prepend`](../commands/prepend.md):
    71    Add data to the start of an array
    72  * [`regexp`](../commands/regexp.md):
    73    Regexp tools for arrays / lists of strings
    74  
    75  <hr/>
    76  
    77  This document was generated from [builtins/core/lists/append_doc.yaml](https://github.com/lmorg/murex/blob/master/builtins/core/lists/append_doc.yaml).