1DBROWCOUNT(1)         User Contributed Perl Documentation        DBROWCOUNT(1)
2
3
4

NAME

6       dbrowcount - count the number of rows in an Fsdb stream
7

SYNOPSIS

9       dbrowcount
10

DESCRIPTION

12       Count the number of rows and write out a new fsdb file with one column
13       (n) and one value: the number of rows.  This program is a strict subset
14       of dbcolstats.
15
16       Although there are other ways to get a count of rows ("dbcolstats", or
17       "dbrowaccumulate -C 1" and some processing), counting is so common it
18       warrants its own command.  (For example, consider how often "wc -l" is
19       used in regular shell scripting.)  There are some gross and subtle
20       differences, though, in that "dbrowcount" doesn't require one to
21       specify a column to search, and it also doesn't look for and skip null
22       data items.
23

OPTIONS

25       No program-specific options.
26
27       This module also supports the standard fsdb options:
28
29       -d  Enable debugging output.
30
31       -i or --input InputSource
32           Read from InputSource, typically a file name, or "-" for standard
33           input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue
34           objects.
35
36       -o or --output OutputDestination
37           Write to OutputDestination, typically a file name, or "-" for
38           standard output, or (if in Perl) a IO::Handle, Fsdb::IO or
39           Fsdb::BoundedQueue objects.
40
41       --autorun or --noautorun
42           By default, programs process automatically, but Fsdb::Filter
43           objects in Perl do not run until you invoke the run() method.  The
44           "--(no)autorun" option controls that behavior within Perl.
45
46       --help
47           Show help.
48
49       --man
50           Show full manual.
51

SAMPLE USAGE

53   Input:
54           #fsdb      absdiff
55           0
56           0.046953
57           0.072074
58           0.075413
59           0.094088
60           0.096602
61           #  | /home/johnh/BIN/DB/dbrow
62           #  | /home/johnh/BIN/DB/dbcol event clock
63           #  | dbrowdiff clock
64           #  | /home/johnh/BIN/DB/dbcol absdiff
65
66   Command:
67           cat data.fsdb | dbrowcount
68
69   Output:
70           #fsdb n
71           6
72           #  | /home/johnh/BIN/DB/dbrow
73           #  | /home/johnh/BIN/DB/dbcol event clock
74           #  | dbrowdiff clock
75           #  | /home/johnh/BIN/DB/dbcol absdiff
76
77   Input 2:
78       As another example, this input produces the same output as above in
79       "dbrowcount", but different output in "dbstats":
80
81           #fsdb      absdiff
82           -
83           -
84           -
85           -
86           -
87           -
88           #  | /home/johnh/BIN/DB/dbrow
89           #  | /home/johnh/BIN/DB/dbcol event clock
90           #  | dbrowdiff clock
91           #  | /home/johnh/BIN/DB/dbcol absdiff
92

SEE ALSO

94       dbcolaccumulate(1), dbcolstats(1), Fsdb(3)
95
97       Copyright (C) 2007-2022 by John Heidemann <johnh@isi.edu>
98
99       This program is distributed under terms of the GNU general public
100       license, version 2.  See the file COPYING with the distribution for
101       details.
102
103
104
105perl v5.34.1                      2022-04-04                     DBROWCOUNT(1)
Impressum