Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/anewerPublic

anewer appends lines from stdin to a file if they don't already exist in the file. This is a rust version ofhttps://github.com/tomnomnom/anew

License

NotificationsYou must be signed in to change notification settings

ysf/anewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

anewer appends lines from stdin to a file if they don't already exist in the file. You could also use it asuniq withoutsort. This is a rust version oftomnomnom/anew. It makes use oftkaitchuck/aHash to cut down runtime to ~50%. Since only hashed lines are held in memory, it cuts down memory usage for inputs with long lines. Which is similar howhuniq works.

Usage

$ anewer -hUSAGE:    anewer [FLAGS] [filename]FLAGS:    -n, --dry-run    Dry run, will leave the file as it is    -h, --help       Prints help information    -v, --invert     Invert the sense of matching    -q, --quiet      Quiet, won't print to stdout    -V, --version    Prints version informationARGS:    <filename>

Installation

cargo install anewer

Add unknown elements of newthings.txt to things.txt

$ cat things.txtZeroOneTwo$ cat newthings.txtOneTwoThreeFour$ cat newthings.txt | anewer things.txtThreeFour$ cat things.txtZeroOneTwoThreeFour

Or use it as simple uniq without sort

$ cat list.txtOneOneTwoTwoThreeFourThreeFour$ cat list.txt | anewerOneTwoThreeFour

License

GPLv3+

About

anewer appends lines from stdin to a file if they don't already exist in the file. This is a rust version ofhttps://github.com/tomnomnom/anew

Topics

Resources

License

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp