neilpa / remux

A command line regex multiplexer

Home Page:https://neilpa.me/remux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

remux

CI

A command line regex multiplexer for filtering and streaming lines to multiple targets.

Example

tail -f log.txt | remux ERROR errors.txt WARN warnings.txt INFO verbose.txt

Install

go get -u neilpa.me/remux

There are also pre-built static binaries for Windows, Mac and Linux on the releases tab.

Usage

remux [options] <regex0> [<file0> [<regex1> <file1> ...]]

By default, source data is streamed from STDIN, use -i to specify a file instead. The -i argument can be set more than once to read from multiple input sources serially. If interleaved input is required, send through paste first

An empty string or - can be provided to -i to explicitly use STDIN. Similarly, an empty string or - for an output file to use STDOUT. Additionally, omitting the last file argument also implies STDOUT as the target.

Alternatives

License

MIT

About

A command line regex multiplexer

https://neilpa.me/remux

License:MIT License


Languages

Language:Go 88.4%Language:Makefile 11.6%