uncached

Crates.iouncached
lib.rsuncached
version0.1.0
sourcesrc
created_at2023-12-02 16:45:34.781424
updated_at2023-12-02 16:45:34.781424
descriptionOnly print new lines, or those which weren't seen in a while
homepage
repositoryhttps://gitlab.com/Zer1t0/uncached
max_upload_size
id1056256
size56,496
Eloy (zer1t0)

documentation

README

uncached

Only print new lines, or those which weren't seen in a while

Usage

Without arguments, uncached will erase repeated lines:

$ cat /tmp/inputs.txt
one
two
one
three
uncached$ cat /tmp/inputs.txt | uncached
one
two
three

A cache file can be provided to avoid repeat lines in a period of time:

$ cat /tmp/inputs.txt
one
two
three
$ # new values are printed
$ cat /tmp/inputs.txt | uncached -c /tmp/in.cache
one
two
three
$ # values are not printed
$ cat /tmp/inputs.txt | uncached -c /tmp/in.cache
$ sleep 5
$ # values older than 4 seconds are printed
$ cat /tmp/inputs.txt | uncached -c /tmp/in.cache
one
two
three
$ echo four >> /tmp/inputs.txt
$ # new values are printed
$ cat /tmp/inputs.txt | uncached -c /tmp/in.cache
four
Commit count: 4

cargo fmt