Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jakewharton/uniqtoo
A version of `sort | uniq -c` with output that updates in real-time as each line is parsed
https://github.com/jakewharton/uniqtoo
Last synced: 7 days ago
JSON representation
A version of `sort | uniq -c` with output that updates in real-time as each line is parsed
- Host: GitHub
- URL: https://github.com/jakewharton/uniqtoo
- Owner: JakeWharton
- License: apache-2.0
- Created: 2021-03-19T15:53:56.000Z (over 3 years ago)
- Default Branch: trunk
- Last Pushed: 2024-09-06T19:24:26.000Z (2 months ago)
- Last Synced: 2024-10-14T12:24:46.453Z (25 days ago)
- Language: Rust
- Homepage:
- Size: 66.4 KB
- Stars: 62
- Watchers: 3
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# `uniqtoo`
A single binary replicating the behavior of `sort | uniq -c | sort -nr` with output that updates
in real-time as each line is parsed.## Usage
Pipe something line-based into `uniqtoo` the same as you would into `sort | uniq -c`.
Here is an example counting the extensions of files in this repository with a 0.5s delay in between.
![An animated example of piping a command into uniqtoo](demo.svg)
You can also supply the input as a file or file descriptor as an argument.
```
$ uniqtoo input.txt
```## Install
### Rust / Cargo
```
$ cargo install uniqtoo
```[![Latest version](https://img.shields.io/crates/v/uniqtoo.svg)](https://crates.io/crates/uniqtoo)
The binary will be placed in your `~/.cargo/bin` which should be on your shell's `$PATH`.
### Docker
A container with the binary is available from Docker Hub and GitHub Container Registry.
* `jakewharton/uniqtoo` [![Docker Image Version](https://img.shields.io/docker/v/jakewharton/uniqtoo?sort=semver)][hub]
* `ghcr.io/jakewharton/uniqtoo`[hub]: https://hub.docker.com/r/jakewharton/uniqtoo/
Use `docker run` instead of directly using the binary.
```
input_command | docker run --rm -i -a STDIN -a STDOUT jakewharton/uniqtoo
```## License
Copyright 2021 Jake Wharton
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.