OILS / _devbuild / help / ysh-stdlib View on Github | oilshell.org

44 lines, 41 significant
1
2 Standard Library<a class="group-link" href="chap-stdlib.html">stdlib</a>
3
4
5 [math] abs()
6 max() min()
7 X round()
8 sum()
9 [list] all() any()
10 repeat()
11 [args] parser Parse command line arguments
12 flag
13 arg
14 rest
15 parseArgs()
16 [yblocks] yb-capture
17 yb-capture-2
18X [Lines] slurp-by combine adjacent lines into cells
19X [Awk] each-line --j8 --max-jobs (Str, Template, Block) - xargs
20 each-row --max-jobs (Str, Template, Block) - xargs
21 each-word xargs-like splitting, similar to IFS too
22 split-by (str=\n, ifs=':', pattern=/s+/)
23 if-split-by
24 chop alias for split-by (pattern=/s+/)
25 must-match (/ <capture d+> </capture w+> /)
26 if-match
27X [Table Create] table --by-row --by-col (&place); construct/parse a table
28 table/cols cols name age - cols name:Str age:Int
29 types type Str Int
30 attr attr units - secs
31 row emit row
32 table cat concatenate TSV8
33 table align to ssv8
34 table tabify to tsv8
35 table header (cols = :|name age|, types = :|Str Int|, units = :|- secs|)
36 table slice e.g. slice (1, -1) slice (5, 7)
37 table to-tsv lose type info, and error on \t in cells
38X [Table Ops] where subset of rows; dplyr filter()
39 pick subset of columns ('select' taken by shell)
40 mutate transmute [average = count / sum] - drop the ones that are used?
41 rename (bytes='bytes', path='filename')
42 group-by add a column with a group ID [ext]
43 sort-by sort by columns; dplyr arrange() [ext]
44 summary count, sum, histogram, any, all, reduce(), etc. [ext]