1DBROWACCUMULATE(1) User Contributed Perl Documentation DBROWACCUMULATE(1)
2
3
4
6 dbrowaccumulate - compute a running sum of a column
7
9 dbrowaccumulate [-C increment_constant] [-I initial_value] [-c
10 increment_column] [-N new_column_name]
11
13 Compute a running sum over a column of data, or of a constant
14 incremented per row, perhaps to generate a cumulative distribution.
15
16 What to accumulate is specified by "-c" or "-C".
17
18 The new column is named by the "-N" argument, defaulting to "accum".
19
21 -c or --column COLUMN
22 Accumulate values from the given COLUMN. No default.
23
24 -C or --constant K
25 Accumulate the given constant K for each row of input. No default.
26
27 -I or --initial-value I
28 Start accumulation at value I. Defaults to zero.
29
30 -N or --new-name N
31 Name the new column N. Defaults to "accum".
32
33 This module also supports the standard fsdb options:
34
35 -d Enable debugging output.
36
37 -i or --input InputSource
38 Read from InputSource, typically a file name, or "-" for standard
39 input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue
40 objects.
41
42 -o or --output OutputDestination
43 Write to OutputDestination, typically a file name, or "-" for
44 standard output, or (if in Perl) a IO::Handle, Fsdb::IO or
45 Fsdb::BoundedQueue objects.
46
47 --autorun or --noautorun
48 By default, programs process automatically, but Fsdb::Filter
49 objects in Perl do not run until you invoke the run() method. The
50 "--(no)autorun" option controls that behavior within Perl.
51
52 --help
53 Show help.
54
55 --man
56 Show full manual.
57
59 Input:
60 #fsdb diff
61 0.0
62 00.000938
63 00.001611
64 00.001736
65 00.002006
66 00.002049
67 # | /home/johnh/BIN/DB/dbrow
68 # | /home/johnh/BIN/DB/dbcol diff
69 # | dbsort diff
70
71 Command:
72 cat DATA/kitrace.fsdb | dbrowaccumulate -c diff
73
74 Output:
75 #fsdb diff accum
76 0.0 0
77 00.000938 .000938
78 00.001611 .002549
79 00.001736 .004285
80 00.002006 .006291
81 00.002049 .00834
82 # | /home/johnh/BIN/DB/dbrow
83 # | /home/johnh/BIN/DB/dbcol diff
84 # | dbsort diff
85 # | /home/johnh/BIN/DB/dbrowaccumulate diff
86
88 Fsdb, dbrowenumerate.
89
91 Copyright (C) 1991-2022 by John Heidemann <johnh@isi.edu>
92
93 This program is distributed under terms of the GNU general public
94 license, version 2. See the file COPYING with the distribution for
95 details.
96
97
98
99perl v5.38.0 2023-07-20 DBROWACCUMULATE(1)