NAME
reorder-tsv - Reorder columns of TSV file by template
VERSION
version 0.1.1
DESCRIPTION
A script for reordering the columns of a tab-separated value (TSV) file according to the columns of a template TSV file.
The input TSV file can be of any length, but the first line must be a header line. The template TSV file should just contain one header line containing the column names. Any other lines will be ignored.
If the template TSV file contains column names that don't appear in the input TSV file then these columns will be blank in the output.
If the input TSV file contains column names that don't appear in the template TSV file then these columns will be discarded.
USAGE
reorder-tsv
[--tsv file]
[--template file]
[--help]
[--man]
EXAMPLES
reorder-tsv --tsv in.tsv --template template.tsv > out.tsv
reorder-tsv --tsv in.tsv.gz --template template.tsv | gzip -c > out.tsv.gz
OPTIONS
- --tsv FILE
-
Input TSV file, with header plus data. The file can optionally be compressed with gzip.
- --template FILE
-
Template TSV file, with header only.
- --help
-
Print a brief help message and exit.
- --man
-
Print this script's manual page and exit.
AUTHOR
Ian Sealy <cpan@iansealy.com>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2020 by Ian Sealy <cpan@iansealy.com>.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007