Skip to content
Split STDIN stream and execute specified command every N lines/seconds.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd
executer
splitter
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
Makefile
README.md
evry.png
evry_test.go
go.mod
go.sum
main.go

README.md

evry Build Status GitHub release

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.

img

Usage

$ [STDIN] | evry [-l N or -s N] -c [COMMAND]

or

$ [STDIN] | evry [-l N or -s N] -- [COMMAND]

Count number of requests every 10 seconds

$ tail -F access.log | evry -s 10 -- wc -l

Show top 5 access rank every 1000 lines

$ tail -F access.log | evry -l 1000 -c 'cut -d" " -f7 | sort | uniq -c | sort -nr | head -5'

Installation

$ go get github.com/k1LoW/evry

or

$ brew install k1LoW/tap/evry

References

You can’t perform that action at this time.