GBFUN(1)
π GBFUN(1) π
okay bestie, welcome to gbfun, a User Commands legend (that's section 1 of the manual, iykyk) β she applies functions to a table of data and she does NOT miss. πΈ
β¨ NAME β¨
gbfun β apply functions to a table of data. literally that's her whole job and she slays it π
π SYNOPSIS π
gbfun [options] <function definition> ...
π¦ DESCRIPTION π¦
So here's the vibe: gbfun computes whatever functions you throw at it, on data it reads from standard input. Periodt.
By default she does the math column-wise, and she does it on each row of data separately. π«Ά
The variable xi stands for the i-th column, while x0 stands for the row number. So like, a function f(x1,x2) operates on the first and second column. iconic.
But wait β with the option -t, the function gets computed, in turn, on every column. In that case f(x1,x2) stands for a function of the column itself and of the following column (the index being a lead operator, no cap). In these cases, x is equivalent to x1. π«
With -r or -R, the function is recursively computed "columnwise" on each row. In this case the variable x identifies the result of the previous evaluation. it's giving β¨main characterβ¨ energy, fr fr.
A lag operator can be specified with the letter l, like in x1l2, which means the first column two steps before. yes she can time travel, we stan. π°οΈ
More functions can be specified, and they'll be considered in turn. the more the merrier bestie π
π OPTIONS π
-Tβ compute the function row-wise, on each column separately. (the flippening π)-tβ compute on each column-rβ set initial value and compute recursively-Rβ set initial value, compute recursively and print intermediary results-vβ verbose mode (she's a talker π¬)-Fβ specify the input fields separators (default" \t")-oβ set the output format (default'%12.6e')-sβ set the output separation string (default' ')-hβ this help
π₯ EXAMPLES π₯
okay so watch her work:
gbfun 'x0+log(x2)' < file
print the log of the second column of file, adding the progressive number of the row. obsessed. π
gbfun -T 'x0+log(x2)' < file
print the log of the second row of file, adding the progressive number of the column. we flipped it, we ate. π
gbfun -r 0 'x+sqrt(x1)' < file
print the sum of the square root of the elements of the first column of file. math but make it cute β¨
π AUTHOR π
Written by Giulio Bottazzi
π REPORTING BUGS π
Found a bug? not the vibe. Report bugs to <gbutils@googlegroups.com> π
Package home page: <http://cafim.sssup.it/~giulio/software/gbutils/index.html>
π COPYRIGHT π
Copyright Β© 2001-2018 Giulio Bottazzi. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (version 2) as published by the Free Software Foundation;
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
bestie that's a LOT of caps, and for good reason β no promises, no guarantees, read the license fr fr π
and that's the whole page π this was gbfun 6.0.beta2, from October 2018 (yes she's vintage, she's an icon), stay hydrated, pipe something into her, bye π«Άπ
π¦ where this page comes from
- debian bookworm: gbutils 6.3-1 Β· GPL-2.0-or-later
- debian trixie: gbutils 6.3-1+b1 Β· GPL-2.0-or-later
- ubuntu jammy: gbutils 6.0-1build2 Β· GPL-2.0-or-later
- ubuntu noble: gbutils 6.3-1 Β· GPL-2.0-or-later
- ubuntu questing: gbutils 6.3-1build1
- ubuntu resolute: gbutils 6.3-1build2 Β· GPL-2.0-or-later
- ubuntu stonking: gbutils 6.3-1build2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms