Skip to content

Nix Flake for tsv-utils - a set of command line utilities for manipulating tabular data files

License

Notifications You must be signed in to change notification settings

gravio-la/tsv-utils.nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TSV-utils Nix Flake

This Nix Flake provides a derivation of tsv-utils, a set of command line utilities for manipulating tabular data files. TSV stands for Tab Separated Values, and refers to a file format for storing tabular data in which each line represents a row and the values in each row are separated by a tab character.

To use this Nix Flake, you will need to have Nix installed on your system.

To view the content of the flake:

nix flake show github:gravio-la/tsv-utils.nix

To build and install tsv-utils from this Nix Flake, run the following command:

nix build github:gravio-la/tsv-utils.nix

This will build tsv-utils and create a symlink to the resulting binary in the current directory. You can then add this directory to your PATH in order to use tsv-utils from the command line.

Alternatively, you can install tsv-utils into your system by running the following command:

nix shell github:gravio-la/tsv-utils.nix

This will install tsv-utils into your Nix profile, making it available to all users on the system.

Using tsv-utils

tsv-utils includes a number of command line utilities for manipulating tabular data files. Some of the most useful utilities are:

  • tsv-filter - Filter lines using numeric, string and regular expression comparisons against individual fields.
  • tsv-select - Keep a subset of columns (fields). Like cut, but supporting named fields, field reordering, and field exclusions.
  • tsv-uniq - Filter out duplicate lines using either the full line or individual fields as a key.
  • tsv-summarize - Summary statistics on selected fields, against the full data set or grouped by key.
  • tsv-sample - Sample input lines or randomize their order. A number of sampling methods are available.
  • tsv-join - Join lines from multiple files using fields as a key.
  • tsv-pretty - Print TSV data aligned for easier reading on the command-line.
  • csv2tsv - Convert CSV files to TSV.
  • tsv-split - Split data into multiple files. Random splits, random splits by key, and splits by blocks of lines.
  • tsv-append - Concatenate TSV files. Header-aware; supports source file tracking.
  • number-lines - Number the input lines.
  • keep-header - Run a shell command in a header-aware fashion.

For more information on how to use these utilities, you can run the --help option for each command, or see the tsv-utils documentation.

Contributing

If you would like to contribute to this Nix Flake, please feel free to submit a pull request on GitHub.

License

tsv-utils is licensed under the MIT License. See the LICENSE file for more information.

About

Nix Flake for tsv-utils - a set of command line utilities for manipulating tabular data files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages