#stdin #length #human-friendly #byte #output #format #terminal

app len

Command to print length of stdin in a human-friendly format

3 unstable releases

0.2.0 Dec 16, 2021
0.1.1 Nov 3, 2019
0.1.0 Nov 3, 2019

#18 in #human-friendly

26 downloads per month

BSD-2-Clause

3KB

len

Command that reads stdin and prints its length in bytes, with human-friendly formatting if the output is a terminal.

Installation

Install Cargo, the package manager for the Rust programming language. Then run:

$ cargo install len

Usage

$ cat /usr/share/dict/words | len

2.4 MiB

len will print its output in human-readable format if the output is a terminal, or a plain number otherwise, in which case it is the same as using wc -c.

Dependencies

~250KB