eBay's TSV Utilities

Command line tools for large tabular data files.


Project maintained by eBay Hosted on GitHub Pages — Theme by mattgraham

Visit the Tools Reference main page
Visit the TSV Utilities main page

number-lines reference

Synopsis: number-lines [options] [fileā€¦]

number-lines reads from files or standard input and writes each line to standard output preceded by a line number. It is a simplified version of the Unix nl program. It supports one feature nl does not: the ability to treat the first line of files as a header. This is useful when working with tab-separated-value files. If header processing is used, a header line is written for the first file, and the header lines are dropped from any subsequent files.

Options:

Examples:

$ # Number lines in a file
$ number-lines file.tsv

$ # Number lines from multiple files. Treat the first line of each file
$ # as a header.
$ number-lines --header data*.tsv

See Also: