https://github.com/robertknight/len
Print length of stdin in a human-friendly format
https://github.com/robertknight/len
Last synced: 2 days ago
JSON representation
Print length of stdin in a human-friendly format
- Host: GitHub
- URL: https://github.com/robertknight/len
- Owner: robertknight
- Created: 2019-11-03T10:06:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-12-16T23:45:31.000Z (over 3 years ago)
- Last Synced: 2025-04-14T04:23:38.688Z (19 days ago)
- Language: Rust
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# len
Command that reads stdin and prints its length in bytes, with human-friendly
formatting if the output is a terminal.## Installation
[Install Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html),
the package manager for the Rust programming language. Then run:```sh
$ cargo install len
```## Usage
```sh
$ cat /usr/share/dict/words | len2.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`.