evry
split STDIN stream and execute specified command every N lines/seconds.
Key features of evry
are:
- Split STDIN stream every N lines or every N seconds.
- Sequential IN -> Parallel execution -> Sequential OUT.
$ [STDIN] | evry [-l N or -s N] -c [COMMAND]
or
$ [STDIN] | evry [-l N or -s N] -- [COMMAND]
$ tail -F access.log | evry -s 10 -- wc -l
$ tail -F access.log | evry -l 1000 -c 'cut -d" " -f7 | sort | uniq -c | sort -nr | head -5'
deb:
Use dpkg-i-from-url
$ export EVRY_VERSION=X.X.X
$ curl -L https://git.io/dpkg-i-from-url | bash -s -- https://github.com/k1LoW/evry/releases/download/v$EVRY_VERSION/evry_$EVRY_VERSION-1_amd64.deb
RPM:
$ export EVRY_VERSION=X.X.X
$ yum install https://github.com/k1LoW/evry/releases/download/v$EVRY_VERSION/evry_$EVRY_VERSION-1_amd64.rpm
apk:
Use apk-add-from-url
$ export EVRY_VERSION=X.X.X
$ curl -L https://git.io/apk-add-from-url | sh -s -- https://github.com/k1LoW/evry/releases/download/v$EVRY_VERSION/evry_$EVRY_VERSION-1_amd64.apk
homebrew tap:
$ brew install k1LoW/tap/evry
manually:
Download binary from releases page
go get:
$ go get github.com/k1LoW/evry
docker:
$ docker pull ghcr.io/k1low/evry:latest