datamash tree with some extra patches. Master branch is mirrored from: https://gitweb.git.savannah.gnu.org/gitweb/?p=datamash.git
  • C 41%
  • Perl 33.7%
  • Shell 15.3%
  • Prolog 3.5%
  • Makefile 2.6%
  • Other 3.8%
Find a file
Georg Sauthoff 59c93e14b7 include stdbool.h to fix gnulib build with clang
gnulib relies on stdbool.h being included from the dynamically
generated config.h, where necessary.

With meson it's more convenient to clearly separate auto-generated macro
definitions from CPP drop-ins. Thus, a static config.h wrapper header
takes care of a standard conforming include before including the generated
config header.
2026-03-05 11:46:48 +00:00
.github maint: update copyright year 2021-01-05 17:47:09 -07:00
build-aux Add myself to a bunch of copyright notices 2025-03-22 11:34:00 +11:00
contrib/bash-completion Add myself to a bunch of copyright notices 2025-03-22 11:34:00 +11:00
doc Add myself to a bunch of copyright notices 2025-03-22 11:34:00 +11:00
examples maint: update copyright year 2021-01-05 17:47:09 -07:00
gnulib@f4038dcb34 gnulib: update to latest 2025-10-25 06:01:58 +11:00
hooks Add framework for installing hooks into cloned git repositories. 2022-06-18 04:37:32 -07:00
lib maint: update copyright year 2021-01-05 17:47:09 -07:00
m4 m4: gitignore: all files ending in '~' 2025-10-26 08:44:32 +11:00
man Add myself to a bunch of copyright notices 2025-03-22 11:34:00 +11:00
modern include stdbool.h to fix gnulib build with clang 2026-03-05 11:46:48 +00:00
po support Meson build system 2026-03-04 23:28:16 +00:00
src support Meson build system 2026-03-04 23:28:16 +00:00
tests datamash: fix out-of-bounds uninitialized read in percentile function 2026-02-23 01:05:10 +01:00
.gitignore Revert "rand: Add new program" 2025-03-22 06:45:06 +11:00
.gitmodules added gnulib submodule 2013-03-29 16:36:11 -04:00
.prev-version maint: post-release administrivia 2025-04-05 07:05:00 +11:00
AUTHORS AUTHORS: Add Georg Sauthoff 2025-01-25 09:10:15 +11:00
bootstrap maint: update copyright year 2021-01-05 17:47:09 -07:00
bootstrap.conf Remove deprecated gnulib fdl module 2022-11-06 19:18:35 -08:00
cfg.mk maint: post-release administrivia 2025-04-05 07:05:00 +11:00
configure.ac Add myself to a bunch of copyright notices 2025-03-22 11:34:00 +11:00
COPYING Initial Commit 2013-03-29 16:34:03 -04:00
HACKING.md Update bootstrap notes for OpenBSD. 2022-11-06 18:38:14 -08:00
init.cfg maint: update copyright year 2021-01-05 17:47:09 -07:00
Makefile.am decorate: fix a buffer under-read 2025-10-25 23:24:05 +02:00
meson.build include stdbool.h to fix gnulib build with clang 2026-03-05 11:46:48 +00:00
meson.options support Meson build system 2026-03-04 23:28:16 +00:00
NEWS datamash: test rmdup with >1MiB key 2025-12-03 20:21:27 +01:00
README Make various changes suggested by make syntax-check 2025-03-29 07:28:14 +11:00
THANKS THANKS: Add Frank Busse 2025-12-03 20:29:02 +01:00
version.texi.in support Meson build system 2026-03-04 23:28:16 +00:00

  Copyright (C) 2005, 2006, 2007, 2009, 2010, 2011, 2012, 2013, 2014, 2015,
  2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Free Software Foundation, Inc.

  Copyright (C) 2013-2021 Assaf Gordon <assafgordon@gmail.com>
  Copyright (C) 2022-2025 Timothy Rice <trice@posteo.net>

  Copying and distribution of this file, with or without modification,
  are permitted in any medium without royalty provided the copyright
  notice and this notice are preserved.

GNU Datamash
============

GNU Datamash is a command-line program which performs basic
numeric,textual and statistical operations on input textual data files.

it is designed to be portable and reliable, and aid researchers
to easily automate analysis pipelines, without writing code or even
short scripts.

Home page: https://www.gnu.org/software/datamash


Usage
=====

See `datamash --help` for basic usage information.

See `man datamash` for examples and operation details.

For the instrucions manual, see `info datamash` or visit
  https://www.gnu.org/software/datamash/manual/



Examples
========

What's the sum and mean of the values in field 1 ?

    $ seq 10 | datamash sum 1 mean 1
    55 5.5

Given a file with three columns (Name, College Major, Score),
what is the average, grouped by college major?

    $ cat scores.txt
    John       Life-Sciences    91
    Dilan      Health-Medicine  84
    Nathaniel  Arts             88
    Antonio    Engineering      56
    Kerris     Business         82
    ...


    # Sort input and group by column 2, calculate average on column 3:

    $ datamash --sort --group 2  mean 3 < scores.txt
    Arts             68.9474
    Business         87.3636
    Health-Medicine  90.6154
    Social-Sciences  60.2667
    Life-Sciences    55.3333
    Engineering      66.5385

See more examples at https://www.gnu.org/software/datamash/examples/


Download and Installation
=========================

Download the latest source code at https://www.gnu.org/software/datamash .

General installation commands:

    $ tar -xzf datamash-[VERSION].tar.gz
    $ cd datamash-[VERSION]
    $ ./configure
    $ make
    $ make check
    $ sudo make install

Also see INSTALL.

See Platform/OS-specific download instructions at
  https://www.gnu.org/software/datamash/download/


To build from latest git sources, see the HACKING.md file. This file is
available when cloning from git, but is not distributed in the tar archive.
To clone the git repository run
    git clone git://git.savannah.gnu.org/datamash.git
It is also available online at
    https://git.savannah.gnu.org/cgit/datamash.git/tree/HACKING.md


BASH Auto-completion
====================

The datamash package inclueds a bash auto-completion script.
The installation location can be controlled using

    ./configure --with-bash-completion-dir=[no|local|global|PATH]

The options are:

* local  - install under the package's $PREFIX path.
           typically `/usr/local/share/datamash/bash-completion.d/` ,
           but can be changed with `./configure --prefix`.
           This is the default.

* no     - do not install the bash completion script.

* [PATH] - install into the PATH specified on the command line, e.g.
           `./configure --with-bash-completion-dir=/for/bar/bash-completion.d/`

* global - install into the system's global bash-completion directory,
           as reported by `pkg-config`. This will be the result of:
           `pkg-config --variable=completionsdir bash-completion`
           Which is commonly `/usr/share/bash-completion/completions`
           or `/etc/bash.d`.
           If `pkg-config` is not found or if `pkg-config` does not have
           the config (.pc) file for the bash-completion package,
           defaults to 'local'.

`local` is the default, and should be used particularly if installing under
a non-default `--prefix` without root permissions.
`global` should be used if you are installing to default location (/usr/local)
and have root permissions (e.g. `sudo make install`).
Using custom PATH or `global` should be used when packaging datamash for
further distribution.

Questions and Bug Reports
=========================

- Please send questions and bug reports to bug-datamash@gnu.org .
- Searchable archive at https://lists.gnu.org/archive/html/bug-datamash .
- Subscribe at https://lists.gnu.org/mailman/listinfo/bug-datamash .


Copyright and License
=====================
Copyright (C) 2013-2021 Assaf Gordon <assafgordon@gmail.com>

License: GPL Version 3 (or later). See COPYING.

For any copyright year range specified as YYYY-ZZZZ in this package
note that the range specifies every single year in that closed interval.