Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sentriz/beside

unix pipeline stage with before and after preview
https://github.com/sentriz/beside

Last synced: 3 days ago
JSON representation

unix pipeline stage with before and after preview

Awesome Lists containing this project

README

        

unix pipeline stage with before and after preview

(probably only useful if there is a 1-1 relationship between stdin and subproc's stdout)
(it's not at problem if subproc buffers its stdout since it's drained in parallel with stdin)

to install

$ go install go.senan.xyz/beside@master

$ cat names
alice
bob
mick

$ cat names | beside sed "s/.*/\U&/"
alice ALICE
bob BOB
mick MICK

it works for streams too

$ yes yes! | beside yes no! | head -n 3
yes! no!
yes! no!
yes! no!

$ printf "%s\n" "today" "yesterday" "tuesday" | beside date +%s -f -
today 1700851529
yesterday 1700765129
tuesday 1701129600

$ jq