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

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