DBCOLMERGE(1)
π DBCOLMERGE(1) β bestie's guide to merging columns π
okay so this is a page from the User Contributed Perl Documentation collection, and it's about a little tool called dbcolmerge and honestly? it's a whole vibe. let's get into it π«Ά
β¨ NAME β¨
dbcolmerge β merge multiple columns into one. that's it. that's the girl. π
π¦ SYNOPSIS π¦
dbcolmerge [-C ElementSeparator] [columns...]
πΈ DESCRIPTION πΈ
okay so picture this: for each row, dbcolmerge merges multiple columns down to a single column β and it's always a string, no exceptions, that's just the rules bestie β joining the elements with ElementSeparator, which defaults to a single underscore (_). lowkey iconic, highkey useful. β¨
π OPTIONS π
-C Sor--element-separator Sβ specify the separator used to join columns. (defaults to a single underscore.) π-e Eor--empty Eβ give value E as the value for empty (null) records. no more awkward blank energy π
This module also supports the standard fsdb options, and yes we're listing all of them, come on now π
-dβ enable debugging output. π-ior--input InputSourceβ read from InputSource, typically a file name, or"-"for standard input, or (if in Perl) aIO::Handle,Fsdb::IOorFsdb::BoundedQueueobjects. π-oor--output OutputDestinationβ write to OutputDestination, typically a file name, or"-"for standard output, or (if in Perl) aIO::Handle,Fsdb::IOorFsdb::BoundedQueueobjects. π--autorunor--noautorunβ by default, programs process automatically, butFsdb::Filterobjects in Perl do not run until you invoke therun()method. the"--(no)autorun"option controls that behavior within Perl. π§--header Hβ use H as the full Fsdb header, rather than reading a header from then input. (yes, "then input", the manpage said what it said, we respect the original βοΈ)--helpβ show help. π«Ά--manβ show full manual. the one you're reading rn, meta ik π
β SAMPLE USAGE β
πΌ Input:
#fsdb first last
John Heidemann
Greg Johnson
Root -
# this is a simple database
# | /home/johnh/BIN/DB/dbcol fullname
# | dbcolrename fullname first_last
# | /home/johnh/BIN/DB/dbcolsplit -C _ first_last
# | /home/johnh/BIN/DB/dbcol first last
πΌ Command:
cat data.fsdb | dbcolmerge -C _ first last
πΌ Output:
#fsdb first last first_last
John Heidemann John_Heidemann
Greg Johnson Greg_Johnson
Root - Root_
# this is a simple database
# | /home/johnh/BIN/DB/dbcol fullname
# | dbcolrename fullname first_last
# | /home/johnh/BIN/DB/dbcolsplit first_last
# | /home/johnh/BIN/DB/dbcol first last
# | /home/johnh/BIN/DB/dbcolmerge -C _ first last
like look at that β John + Heidemann = John_Heidemann, slay. and Root with a - becomes Root_ because the empty side just... doesn't show up. ate and left no crumbs π
π₯ SEE ALSO π₯
Fsdb. dbcolsplittocols. dbcolsplittorows. dbcolrename.
(the whole friend group, honestly π―ββοΈ)
π AUTHOR and COPYRIGHT π
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. π
kay that's the whole thing, hope it ate π this page came to you courtesy of perl v5.32.1, dated 2024-08-02, and it's the DBCOLMERGE(1) page β go merge some columns bestie, ily, bye πβ¨π¦
π¦ where this page comes from
- epel 9: perl-Fsdb 2:3.9-1.el9 Β· GPLv2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms