DBROWACCUMULATE(1)

πŸ“¦
version 3.9 Β· 3 versions
, in epel 9

πŸ’– NAME πŸ’–

okay bestie, welcome to the dbrowaccumulate page from the User Contributed Perl Documentation, aka DBROWACCUMULATE(1) if you're being formal πŸ’…. Short version: dbrowaccumulate β€” compute a running sum of a column. Periodt. ✨

✨ SYNOPSIS ✨

dbrowaccumulate [-C increment_constant] [-I initial_value] [-c
increment_column] [-N new_column_name]

πŸ’… DESCRIPTION πŸ’…

okay so this icon computes a running sum over a column of data, or over a constant incremented per row β€” maybe you're doing it to generate a cumulative distribution, iykyk. πŸ¦‹

What to accumulate is specified by -c or -C, no cap.

The new column is named by the -N argument, defaulting to accum. Slay.

πŸ”₯ OPTIONS πŸ”₯

  • -c, --column COLUMN β€” accumulate values from the given COLUMN. No default, bestie β€” you gotta pick one. πŸ’–
  • -C, --constant K β€” accumulate the given constant K for each row of input. No default. ✨
  • -I, --initial-value I β€” start accumulation at value I. Defaults to zero. πŸŽ€
  • -N, --new-name N β€” name the new column N. Defaults to accum. πŸ’œ

This module also supports the standard fsdb options, bestie:

  • -d β€” enable debugging output. πŸ›
  • -i, --input InputSource β€” read from InputSource, typically a file name, or "-" for standard input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue objects. 🌸
  • -o, --output OutputDestination β€” write to OutputDestination, typically a file name, or "-" for standard output, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue objects. 🌈
  • --autorun or --noautorun β€” by default, programs process automatically, but Fsdb::Filter objects in Perl do not run until you invoke the run() method. The --(no)autorun option controls that behavior within Perl. πŸ‘‘
  • --help β€” show help. 🫢
  • --man β€” show full manual. πŸ“–

πŸ§ͺ SAMPLE USAGE πŸ§ͺ

🌸 Input:

#fsdb      diff
0.0
00.000938
00.001611
00.001736
00.002006
00.002049
#  | /home/johnh/BIN/DB/dbrow
#  | /home/johnh/BIN/DB/dbcol diff
#  | /home/johnh/BIN/DB/dbsort diff

πŸš€ Command:

cat DATA/kitrace.fsdb | dbrowaccumulate -c diff

πŸŽ€ Output:

#fsdb      diff    accum
0.0     0
00.000938       .000938
00.001611       .002549
00.001736       .004285
00.002006       .006291
00.002049       .00834
#  | /home/johnh/BIN/DB/dbrow
#  | /home/johnh/BIN/DB/dbcol diff
#  | /home/johnh/BIN/DB/dbsort diff
#  | /home/johnh/BIN/DB/dbrowaccumulate diff

πŸ‘€ SEE ALSO πŸ‘€

Fsdb, dbrowenumerate. Go check 'em out, bestie πŸ’–

Copyright (C) 1991-2022 by John Heidemann <johnh@isi.edu>

This program is distributed under terms of the GNU general public license, version 2. See the file COPYING with the distribution for details.


that's the DBROWACCUMULATE(1) page, source/version perl v5.32.1, dated 2024-08-02 β€” byeee, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from