Soaks up all input from stdin and writes it to a file or stdout
Update README
Relicense as MIT
Refactor main into soak and squeeze

refs

master
browse log
v1.0.2
browse .tar.gz

clone

read-only
https://git.sr.ht/~tslocum/sponge
read/write
git@git.sr.ht:~tslocum/sponge

You can also use your local clone with git send-email.

sponge

builds.sr.ht status Donate

Soaks up all input from stdin and writes it to a file or stdout. Pipelines reading from and writing to the same file may be safely constructed.

grep [...] log.txt | sponge log.txt

Installation

go get git.sr.ht/~tslocum/sponge

Usage

sponge [-a] [file]: soak up all input from stdin and write it to [file] or stdout

Support

Please share issues and suggestions here.

Credits

sponge was originally written in C by Tollef Fog Heen.