tsv_utils.tsv_select

A variant of the unix 'cut' program, with the ability to reorder fields.

tsv-select is a variation on the Unix 'cut' utility, with the added ability to reorder fields. Lines are read from files or standard input and split on a delimiter character. Fields are written to standard output in the order listed. Fields can be listed more than once, and fields not listed can be written out as a group.

This program is intended both as a useful utility and a D programming language example. Functionality and constructs used include command line argument processing, file I/O, exception handling, ranges, tuples and strings, templates, universal function call syntax (UFCS), lambdas and functional programming constructs. Comments are more verbose than typical to shed light on D programming constructs, but not to the level of a tutorial.

Copyright (c) 2015-2021, eBay Inc. Initially written by Jon Degenhardt

Members

Enums

RestLocation
enum RestLocation

Enumeration of the different specializations of the tsvSelect template.

Functions

main
int main(string[] cmdArgs)

Main program.

tsvSelect
void tsvSelect(TsvSelectOptions cmdopt)

tsvSelect does the primary work of the tsv-select program.

Static variables

rt_options
string[] rt_options;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Structs

TsvSelectOptions
struct TsvSelectOptions

Container for command line options.

Variables

helpText
auto helpText;
Undocumented in source.
helpTextVerbose
auto helpTextVerbose;
Undocumented in source.

Meta

License

Boost Licence 1.0 (http://boost.org/LICENSE_1_0.txt)