Skip to content
This repository has been archived by the owner on Feb 18, 2019. It is now read-only.
/ huniq Public archive

Simple uniq implementation in Rust that doesn't require sorting

License

Notifications You must be signed in to change notification settings

ahamlinman/huniq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

huniq

huniq writes deduplicated lines from standard input to standard output. It is differentiated from the standard uniq by not requiring sorted input. Internally, it uses Rust's standard HashSet type to accomplish this.

Why does this exist?

I originally created huniq for use in a pipeline with fzf. Since huniq can start printing lines immediately (whereas sort -u needs to read all input first), fzf can start matching more quickly.

Plus, it was a good excuse to finally start learning Rust. (This is the real reason, since I'm sure that better versions of this idea are already available.)

Installation

At this time, huniq must be compiled manually.

  1. Install Rust
  2. cargo install --git https://github.com/ahamlinman/huniq.git

License

MIT (see LICENSE.txt)

About

Simple uniq implementation in Rust that doesn't require sorting

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages